Order of execution across flows and triggers
Where before-save flows, Apex triggers, validation rules, assignment rules, after-save flows, roll-ups and post-commit work interleave in one save, why Trigger Order can't reorder Apex, and how one automation's DML re-fires another.
Given a scenario, identify the considerations of interactions between multiple processes, both declarative and programmatic.
~8 min read · 9 practice questions ·
What the exam expects
- Predict what a before trigger, validation rule or after trigger sees when before-save flows, triggers and assignment rules all act on one save.
- Explain why two Apex triggers on the same object and event run in no guaranteed order, and what Trigger Order in Flow Trigger Explorer can and can't sequence.
- Diagnose re-entry: an after-save flow or trigger whose DML sends the record back through the save, and gate the logic so it doesn't run twice.
- Recognise roll-up cascades, and which post-commit work is lost on rollback.
Key terms: save order of execution (the fixed server-side sequence for insert, update and upsert); before-save flow (optimized for Fast Field Updates); after-save flow (optimized for Actions and Related Records); Trigger Order (a 1-2,000 value sequencing record-triggered flows of the same type); recursive save (a record re-entering the save through DML in the same transaction); post-commit logic (work that starts only after the commit).
Key facts
- Detail
- Before-save flows run immediately before Apex before triggers
- Detail
- Run after before triggers, so they check values the triggers set
- Detail
- Run after all after triggers (step 9 follows step 8)
- Detail
- Firing order isn't guaranteed
- Detail
- 1 to 2,000; same trigger type on the same object only
- Detail
- 1-1,000 ascending, then unvalued flows by activation date, then 1,001-2,000
- Detail
- Skips steps 9 (assignment rules) through 17
- Detail
- Parent record goes through the save procedure before the commit
- Detail
- Email, queueable and future jobs, asynchronous flow paths
- Detail
- Doesn't keep its value between trigger contexts
- Why does a before insert trigger see a value set by a Fast Field Updates flow on the same object?
- When does an after insert trigger on Case see the queue an assignment rule chose?
- Why can't Trigger Order fix two Apex before insert triggers that depend on each other?
- Which work never starts when a save rolls back after a trigger enqueued a Queueable and sent an email?
The questions are free to read. Answers with their sources and self-grading are included with the pack.
Keep reading with the Platform Developer II pack
- Core concepts
- Exam traps
- Worked scenario
The pack includes:
- All 28 lessons of the Platform Developer II guide, with reading progress
- Interactive decision walks and step-by-step sequence steppers
- Inline practice questions and one-click topic practice (9 questions for this lesson)
- An official source cited for every claim
- An AI tutor that answers from the guide
- Unlimited timed practice exams