Previous Topic: RI Type Override TemplatesNext Topic: Change an RI Type Override Trigger Template


Create an RI Type Override Trigger Template

You can use the Trigger Template Editor to create an RI Type Override template in a physical model, which changes the behavior of the built-in template for an RI Trigger Type.

To create an RI type override trigger template

  1. Click RI Trigger Templates on the Model menu.

    The Trigger Template Editor opens.

  2. Select one of the following options:
    Create a new template from an existing template

    Select the template in the Trigger Template Name grid, and click the New New icon in property editors to create a new object button. Click Yes when you are prompted to confirm whether you want to copy the template code of the selected template to a new trigger template. The new template displays in the Trigger Template Name grid with a default name, which you can change in this field.

    Create a new, blank template

    Click the New New icon in property editors to create a new object button on the toolbar. The new template displays in the Trigger Template Name grid with a default name, which you can change in this field.

    Add text or code to a template

    Select the template in the Trigger Template Name grid, and click the Code tab. Enter the text or code in the code area. You can use the toolbar to cut, copy, or paste text, open the Macro Toolbox, or work with the Text Editor.

    Add macro code to a template

    Select the template in the Trigger Template Name grid to which you want to add macro code and click the Code tab. Position the cursor in the code area where you want to insert the macro code. Click the Macro Toolbox Macro Toobox button to open the Macro Toolbox. Select the macro you need and click the Insert Macro button. Type any parameters required in the code area.

  3. Click the Referential Integrity Type tab and select the RI action to attach to the new template.
  4. Click Close.

    The RI Type Override template is created and the Trigger Template Editor closes.

Note: You must select the RI Type Override check box for triggers during schema generation to generate an RI type override template in the schema.

More information:

Change the Template that is Attached to an RI Trigger