Loading

Process Order for Salesforce Automation Rules and Apex Triggers — Key Reminders

게시 일자: Jun 10, 2026
상세 설명

When implementing automation in Salesforce — such as Apex triggers, Workflow Rules, Process Builder flows, and validation rules — understanding the order in which these automations execute is critical to avoid unexpected behavior, data integrity issues, or infinite loops.
Salesforce follows a defined order of execution for each save operation (insert, update, upsert, delete, undelete). You can refer to the Apex Developer Guide — Triggers and Order of Execution for the full sequence.
This article provides key reminders about that order and highlights common edge cases to be aware of when designing automation in Salesforce.

솔루션

Process Reminders and Helpful Tips

  • You are unable to control the order of execution within each Apex trigger group. If multiple Apex triggers exist on the same object for the same event, Salesforce does not guarantee the order in which they fire.
  • Workflow field updates based on an approval process or a time-dependent action will not trigger any further rules (Workflow Rules, Flows, or Apex triggers).
  • Formula fields do not execute in the same manner as Workflow fields. Formula fields calculate and display their results in real-time whenever the field is accessed. For example, if a Workflow Rule uses a formula field in its criteria, the formula field is evaluated only when the Workflow Rule criteria is checked — not when the formula field's underlying values change.

Real-life example: If you have both an Apex trigger and a Workflow Rule that update the same field on an Account record, the Workflow field update runs after the Apex trigger completes, but it will NOT re-fire the Apex trigger. This is important to know when designing automation that depends on the final field value.

Knowledge 기사 번호

000385534

 
로드 중
Salesforce Help | Article