Event aread

Description

This event is used when a read operation has been triggered in a CRUD operation of a working copy (when the $edit facet is requested) either on the main class or on a child class. It allows development partners to write their own code for implementing the database read. This event is called in two cases:

If the conditions above are fulfilled, the event is called when a CRUD operation reads an instance of the class in the database for a working copy. When the entity managed has a child structure, it can be either on an instance of the main class or 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.

Context

The following variables or properties are available in the context:

Example:

Let's take the example of a BOM table that has a main key with 3 components (ITMREF, BOMALT, BOMALTTYP).
If we imagine (it will probably not be the case) that the developers wants to handle the AREAD method by himlelf, the 3 parameters ITMREF, BOMALT, and BOMALTTYP would be sent with their name, and this mean that the method implementation would execute lines such as:

$AREAD_METHODLocal File BOM [BOH]Read [BOH]BOH0=[L]ITMREF;[L]BOMALT;[L]BOMALTTYP...