Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Salesforce Administrator
hard

Walk me through Salesforce's Order of Execution when a record is saved.

When a record is inserted or updated, Salesforce runs a fixed pipeline. Knowing this order is what lets you predict why automations fire (or don't) when they should.

The simplified order — there are about 20 steps but the ones that matter to admins are:

  1. System Validation — required fields, max field length, foreign key validity.
  2. Apex `before` triggers — run code that needs to mutate the record before save.
  3. Custom Validation Rules — your declarative rules. If any returns FALSE, save is rejected here.
  4. Before-save record-triggered Flows (Fast Field Updates) — modern, fastest place to update fields on the same record.
  5. Database save (commit-1) — the record is persisted, but the transaction is not yet committed.
  6. Apex `after` triggers — code that needs the record's Id (assigned at step 5).
  7. Assignment Rules — Lead/Case assignment rules execute.
  8. Auto-Response Rules — Lead/Case auto-response.
  9. After-save Record-Triggered Flows — declarative automation that runs after the save.
  10. Workflow Rules — legacy, fire field updates and outbound messages.
  11. Processes — Process Builder logic (legacy).
  12. If a workflow field update happened, before/after triggers and validation rules fire AGAIN on those fields (recursion guard).
  13. Escalation Rules (Cases).
  14. Entitlement Rules (Cases).
  15. Roll-Up Summary recalculation on parent records.
  16. Sharing rules evaluation.
  17. Database commit (commit-2) — transaction now durable.
  18. Post-commit logic: Outbound Messages, async (queueable, future, batch), Platform Events that publish on commit.

Practical takeaways:

  • Before-save flows are the cheapest place to update fields on the saving record.
  • Validation rules fire twice if a workflow field update changes a referenced field.
  • After triggers are where you do anything that needs the record's Id.
  • Outbound Messages and async Apex run only after commit-2 — they don't see the record's intermediate state.

Why this answer works

One of the deepest admin questions; many admins can't answer it cleanly. A senior interviewer is checking that you can predict why an automation fired or didn't. Naming before-save flows specifically and mentioning the workflow re-entry is a strong signal of practical experience.

Follow-ups to expect

Related dictionary terms