You can define a function that is triggered by a form or control event or modify an existing function.

To define or modify a form or control trigger

  1. Open the form in the Form Designer.

  2. Select the form or the control (or menu item) and click View and then click C/AL Code (F9) to open the C/AL Editor.

  3. In the editor, you have access to the triggers that apply to the object that you selected. Enter C/AL code in the triggers that you want to use, or modify the existing triggers.

  4. Click Tools and then click Compile (F11) to test and compile the form. This will include the code that you added or modified.

See Also