OnEvent Method

For the OnEvent method, a default implementation is available for:

  • standard event actions (create, change, delete);
  • specific event actions, in which case the request is forwarded to the corresponding method (unless a different implementation is coded in the OnEvent on execute hook).

For example, a ‘change’ event is by default processed by invoking the ‘Change’ method, and an ‘approve’ event is by default processed by invoking the ‘Approve’ method.

No default implementation is available for ‘list’ events currently. Note that such events cannot be handled by the List method.

Note that the default implementation for handling of create events may be a problem in case of generated data. For example, if an order number is automatically generated in the Create method, but a create event is received from another application which already contains an order number, the order number from the event is unused. This means the corresponding orders in the applications will have a different number. If you need to avoid this, handle the create event in the on execute hook for the OnEvent method.