Triggers activate a function when a certain event occurs. This topic introduces the concept of triggers. For more information, see Defining Form and Control Triggers.


When C/AL functions are executed as a result of a predefined event on either a form or a control, the event triggers the function. Together the event and function make a trigger.

Form triggers include OnOpenForm and OnModifyRecord. OnOpenForm is a statement that is executed when the form opens. OnModifyRecord is a statement that is executed before accepting changes that the user has made to a record. Triggers are edited in the C/AL editor that can be opened from Form Designer.

See Also