Database trigger events

Database trigger events are raised on data manipulations: when a record is being inserted, deleted, or updated. Each of these database events has two counterparts in C/AL: one event is raised before the data change occurs in the database, and the second one after data modification. The names of these events begin with OnBefore and OnAfter, respectively. There are eight events related to C/AL data manipulation functions:

  • OnBeforeInsertEvent
  • OnAfterInsertEvent
  • OnBeforeDeleteEvent
  • OnAfterDeleteEvent
  • OnBeforeModifyEvent
  • OnAfterModifyEvent
  • OnBeforeRenameEvent
  • OnAfterRenameEvent

Two other events, OnBeforeValidateEvent and OnAfterValidateEvent, are raised when a field is validated: before the field's OnValidate trigger ...

Get Microsoft Dynamics NAV Development Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.