Add Platform triggers to automate tasks

Anytime you have a recurring event related to a consistent change in record data, you can use a trigger. It might run on record creation, record update, or record deletion. For example, on a CRM application, you can use a trigger that sends an email to a manager when an opportunity is created or deleted. Or, you might send an email when the dollar value of the opportunity gets updated.

The Platform trigger infrastructure works on standard and custom objects. Developers can place triggers before and after creating, updating, and deleting an object. Note that when working with Purchasing approval states, Triggers cannot fire based on partially approved or declined states.
Pay attention to trigger order and dependencies. If you create two triggers that fire on update and one of the triggers updates the record, you could fire off an unintentional loop. In such a case, add controls to the trigger formula to account for the changes made by the two triggers.
  1. Go to Platform Services > Objects.
  2. A list of all objects appears.

  3. Find and select the object to which you want to add a trigger.
  4. Use the Filter by application dropdown list at the top of the page to filter by custom applications.

  5. At the top of the Object Definition page, select Triggers.
  6. In the Triggers section, select New trigger.
  7. The New Trigger page displays.

  8. Select a Trigger type that matches the type of action you want to perform.
  9. Select Next.
  10. Make sure to select This trigger is deployed.
  11. In the Trigger Activation section, select when this trigger will activate.

    Select at least one trigger activation option.

    Trigger activation option details

    Trigger activation option

    Details

    Before createActivates when a user adds a record before the record is posted.
    Before updateActivates when a user changes a record before the update is posted.
    Before deleteActivates when a user deletes a record before the record is deleted in Intacct.
    After createActivates when a user adds a record after the record is posted.
    After updateActivates when a user changes a record after the update is posted.
    After deleteActivates when a user deletes a record after the record is deleted in Intacct.
     
  12. Enter an easily identifiable and unique Trigger name.
  13. For update triggers, select a specific field change that activates the trigger in Field to change. Any change in this value activates this trigger.

    For example, someone selecting an Approval box can change the status of the record from Concept to Project. Only a change in that field will activate the trigger. The default is to activate the trigger on any update.

    When you create a trigger, fields that might result in corrupt data do not appear as options for standard fields. Direct updates are only allowed on custom fields. Refer to Triggers field block list.

  14. Optionally, select Run offline to run the trigger in the background while the user continues with their work.
    This option is not available for the Validation trigger type.
  15. Set the remaining properties for each Trigger type. See Set trigger type properties for more information about the options.
  16. In the Change Value Formula section, create a conditional expression that executes the trigger if it evaluates to true.
  17. Select Save.