Updated on 2025-08-15 GMT+08:00

Creating a Trigger

You can design triggers to meet specific needs, allowing the system to automatically execute tasks as intended, thus achieving the desired outcomes. For example, you can create a trigger based on the Employee__CST object. When a record with name set to zhangsan is created or updated in the system, the system sends a notification email to zhangsan@qq.com.

Creating a Trigger

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, click Logic.
  3. (Optional) Click next to Trigger to add a folder.

    By default, triggers are stored in the root folder. Before creating an event, you can create a folder for storing the trigger. You can drag the trigger to a specified folder.

  4. Move the cursor to the created trigger folder and click . The page for adding a trigger is displayed.

    If no trigger folder is created, click next to Trigger. The page for adding a trigger is displayed.

  5. Set the trigger object, label, name, and trigger type, and click Add. The trigger editing page is displayed.

    Figure 1 Creating a trigger
    Table 1 Parameters for creating a trigger

    Parameter

    Description

    Object

    Select an associated object from the drop-down list. You can select an existing object in the current application or an object created in another application.

    Label

    Trigger label, which is displayed on the page and can be modified after being created.

    Value: 1–64 characters.

    Name

    Trigger name. A trigger name uniquely identifies a trigger in the system. The system automatically generates a trigger name based on the label. The name cannot be modified after being created. The naming requirements are as follows:

    • The value cannot exceed 64 characters, including the prefix namespace.

      To prevent duplicate data names among different tenants, each tenant must define a unique namespace when first creating an application. A tenant can create only one namespace. After being created, the namespace cannot be modified.

    • Start with a letter and can contain only letters, digits, and underscores (_). Do not end with an underscore (_).

    Description

    Enter the description of the trigger.

    Value: 1–255 characters.

    Trigger Type

    Select a trigger type from the drop-down list.

    • On record insert only: Start the trigger when a record is created.
    • On record update only: Start the trigger when a record is updated.
    • On record insert or update: Start the trigger when a record is created or updated.
    • When called by another trigger: When it is called by another trigger.
    • When platform event is received: Triggered by an event. If this type is selected, configure a specific event in Event.

  6. Click Add Criteria, set conditions, and click Save.

    Figure 2 Creating a rule
    • Criteria Name: name of the new rule.
    • Execution Condition: condition for entering the rule. For example, set this parameter to When conditions are met.
    • Set Condition: Set the field to name, operator to Equal, type to Constant Value, and value to zhangsan.

  7. Click Add Action, set the action to be executed after the rule conditions are met, and click Save.

    Figure 3 Creating an action
    • Action Type: Specify the action type, for example, Email Alerts.
    • Action Name: Enter the name of the action to be created.
    • Email Alert: Select the configured email alarm.

  8. Click in the upper part of the trigger editing page to activate the trigger.
  9. Verify the configuration.

    Create a record based on the Employee__CST object. Set the name field of the object to zhangsan. If the user whose email address is 123@qq.com receives the notification email, the trigger is created successfully.

FAQs

Who determines the permission to perform actions set by a trigger: the trigger creator or the trigger user?

Answer: Permission to execute trigger actions depends on the user's own permissions, not the trigger creator. For example, a trigger is associated with the object D__CST, the trigger type is On record insert or update, and the event C is executed when the trigger is triggered. That is, when data of the object D__CST is added or updated, the trigger is triggered, to execute the event C. User A is the trigger creator and does not have the permission to operate object D__CST or execute event C. User B has the permission to operate object D__CST and execute event C. When user B updates the data of object D__CST, the trigger is triggered to execute event C.