Create a trigger
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
There are two types of triggers: session and schema. You create session triggers as part of an ABL procedure, and you create schema triggers using the Data Dictionary.
There are two types of schema triggers:
- Table trigger
- Field trigger
To create a table trigger:
- Choose or choose . If you are adding a new table, specify a table name. If you are modifying a table, the Data Dictionary alphabetically lists all the tables defined for your database. Select the table for which you want to create the trigger.
- Choose Triggers. The Table Triggers dialog box appears.
- Define the trigger attributes. For more information on the Table Triggers dialog box and the trigger attributes, see Table Triggers option.
- Specify whether a session trigger can override this schema trigger. For more information about session and schema triggers, see the topic on database triggers in Develop ABL Applications.
- Specify whether the database engine checks the cyclical redundancy check (CRC) code for the trigger.
- Press PUT to enter the trigger code. The Data Dictionary displays the Trigger Code dialog box.
- Enter the trigger code.
- Choose OK to return to the Table Triggers dialog box.
- Choose OK to return to the Add Table or Modify Table window.