Select your Language

What is Order of Execution in Salesforce?

 

Order of Execution

Salesforce order of execution steps are blow:


  • Loads Initial record.
  • If standard UI edit page, Salesforce runs system validation to check the record for page layout-specific rules.
  • Executes before record-triggered flows.
  • Executes all before triggers
  • Runs most Custom validation.
  • Executes duplicate rules
  • Saves the record to the database, but doesn’t commit yet. 
  • Executes all after triggers
  • Assignment rules
  • Executes auto-response rules
  • Executes workflow rules. If there are workflow field updates,
    • updates the record again. 
    • If the record was updated with workflow, fires before update triggers and after update trigger one more time and Custom validation rules are not run again.
  • Escalation rules.
  • Executes these Salesforce Flow automations
  • Executes record-triggered flows that are configured to run after the record is saved.
  • Executes entitlement rules
  • Performs calculations and updates the roll-up summary field in the parent record. 
  • Commits all DML operations to the database
  • Executes all after-commit logic.
    • sending email.
    • asynchronous Apex jobs
    • Asynchronous paths in record-triggered flows



No comments:

Post a Comment