Event aupdate_control_after
This event is called before the update of a line in the database and after the automated controls have been done such as the mandatory fields, format consistency, and other individual controls. It works similar to the AINSERT_CONTROL_AFTER event. The development partner has access to the this.snapshot
reference to access the origin value of the property being controlled.
When nested classes must be controlled, such as a 3-level header / line / sub-line structure exists, the event is performed in ascending level order. The event is performed on the sub-lines associated with the first line first, then on the first line, then on the sub-lines associated to the second line, then on the second line, and so on, until all the lines have been controlled. Finally the event is done on the header.
When complex updates are done on nested classes, this event is called only if a line has been modified.
- If a new line is inserted, the insertion events are called on the line.
- If a line is deleted, the deletion events are called on the line.
- If a line is not modified, no event is called on the line.
If all of the controls related to the update are not fulfilled, an error can be triggered.
Context
The following variables or properties are available in the context:
this
refers to the current class. All properties can be found using the this.PROPERTY syntax.this.snapshot
refers to the initial values for the current class and allows a development partner to know if a modification was done on some properties.CURPTH
describes the child class path if the method is called on a child class. If the method is called on the main class, CURPTH is empty.AEVENT
is equal to AUPDATE_CONTROL_AFTER.