Previous Topic: Trigger Defaults for RelationshipsNext Topic: Change the Default Referential Integrity Settings for All Relationships


Change the Template that is Attached to an RI Trigger

You can use the Trigger Templates dialog to change the template that is attached to an RI trigger type and view or change the macro code used by a particular template. When you change the template for a trigger, you can use a built-in template or a custom (user override) template.

To change the template that is attached to an RI trigger

  1. Click RI Triggers Templates on the Database menu.

    The Trigger Templates dialog opens.

  2. Work with the following options and click Close:
    Referential Integrity Type

    Displays the name of the database action and referential integrity action (for example, CHILD Delete CASCADE) that causes the associated trigger to fire.

    Attached Trigger Template

    Displays the name of the trigger template that is generated for the corresponding Referential Integrity Type.

    Rebind

    Attaches the default trigger templates to the associated referential integrity type.

    Detach

    Detaches the selected trigger template from the associated referential integrity type. A trigger is only generated for the selected referential integrity type when it has an associated trigger template.

    Built-In Trigger Template

    Lists the default built-in trigger templates.

    Attach

    Attaches the selected built-in trigger template to the selected referential integrity type.

    User Override

    Lists the user-defined trigger templates available in a model.

    Attach

    Attaches the selected user-defined trigger template to the selected referential integrity type.

    Template Name

    Displays the name of the selected template. Enter a new name and click Add to add it to the User Override list.

    Add

    Adds a user-defined trigger template to the User Override list.

    Delete

    Deletes the selected user-defined trigger template.

    Macro Toolbox

    Opens the Macro Toolbox where you can select a macro to add to the trigger template.

    Template Code

    Displays the template code in the selected built-in or user-defined trigger template.

    Your changes are saved and the dialog closes. Click Cancel to close the dialog without saving your changes.

More information:

Create an RI Type Override Trigger Template

Change an RI Type Override Trigger Template

Delete an RI Type Override Trigger Template

Change the Template Attached to an RI Action

Insert a Macro into a Template Code Window

View Trigger Template Macro Code

Triggers