Event adelete_control_after

This event is called after the automated consistency control of the referential integrity based on dictionary definition, but before the delete operation in the database. For example, this can be the verification when a product must be deleted, but no sales orders have been created for this item.

This event works similar to the AINSERT_CONTROL_AFTER event for nested classes. The control is performed in ascending order of the hierarchy. For example, if a 3-level header / line / sub-line structure exists, 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 with 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. If the deletion conditions are not all 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.
  • 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 ADELETE_CONTROL_AFTER.