Here is, the flow of processing of commands, in chronological order, when a user submits a form from a DreamApps page.
preconfig in valid object.
event before in all non-command fields in form object
check for mandatory fields as defined in valid, field-tables and form objects
if no-error, check in valid object
if no-error, before for matched commands in valid object
if no-error, event before for matched command in form object
if no-error, execute appropriate standard command action (Find, Clear,Show,Top,Previous, Next, Bottom, Add, Update, Delete)
if no-error, event after for matched command in form object
if no-error, after for matched commands in valid object
event after in all non-command fields in form object
If no-error, execute return specs in valid object
if value of page has not changed, config in valid object
if value of page has not changed prior to config, display in valid object
Notes
Striked-out processes are deprecated and supported only for backward compatibility. For new resources, do not use events in fields embedded in forms. Those were useful when valid objects were not available. Use before and after processes instead of command field events and preconfig and config instead of non-command field events. This will remove all confusions about order of execution of commands spread around different fields.