Event ainsert

Description

This event is called to allow development partners to write their own code for implementing the database insertion. This event is called in two cases:

If the conditions above are fulfilled, the event is called when a CRUD operation reads an insertion of an instance of the class in the database for a working copy. When a creation is in progress, it can be on an instance of the main class. When a creation or an update is done on the main instance, it can be on an instance of a child class.

If an error occurs during this update, the development partner can use the ASETERROR(PRO,MES,NUM) method on the current class to handle it. A Rollback will automatically be triggered and the corresponding AINSERT_ROLLBACK event will be called.

Context

The class is filled, all the controls have been performed, and the table declared in the class logic is opened. A transaction is in progress. The development partner can insert data in the database for the concerned class.

The following variables or properties are available in the context: