Event aread_before

This event is called before an instance of a class will be filled with a data set extracted from the database. Thus, it can be called at query time, at detail display time, or at the beginning of an edit activity.

When the event is called, the instance is present but no read operation has been performed on the database. This means that the read operation can be refused by setting an error.

This event must be called only on the main class and not on nested classes as it will be done for the AREAD_AFTER event.

Context

The instance this is present but empty, the table declared in the class logic is opened, but no read operation has been done.

The following variables or properties are available in the context:

If an error is thrown by the ASETERROR method, a read attempt in the database will not be performed and a message "record does not exist" will be displayed.