Loading
Salesforce now sends email only from verified domains. Read More
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Workflow for Using a Trigger and an On Creation Action

          Workflow for Using a Trigger and an On Creation Action

          You can configure a trigger to perform initialization tasks when a new base object record is created. A common initialization task, available in Spring '20 and later releases, is to process an On Creation Action associated with the State Model Version. Other initialization tasks are possible. For example, a trigger for Application__c records sets the initial state of the associated State Model to the Submitted state.

          Before You Begin

          Before you can set up a trigger and an On Creation Action, you must prepare the base object and create the State Model, States, and State Transitions. You don't need the State Rules or other actions, because your State Model only needs to reach the initial state. However, you do need the ReportCardEmail class that other actions use.

          To create the example On Creation Action, you must first perform these tasks at a minimum:

          In the Report Card State Model example, an enrollment email is sent to the student when a new Report_Card__c object is created.

          As an alternative to using an On Creation Action, you can create an action associated with the initial state. This doesn't require a trigger. See Workflow for Creating Actions for States and Rules.

          1. Create an EnableStateModel Trigger in Custom Settings.
          2. Create a Trigger for the Base Object.
          3. Create the Email Template for the On Creation Action.
          4. Create the Vlocity Action for the On Creation Action.
          5. Add the On Creation Action.
          6. Test the On Creation Action.
           
          Loading
          Salesforce Help | Article