Salesforce Admin Zero to Hero - Module 15: Record-Triggered Flow & Order of Execution | SF Interview Pro
🔄 Salesforce Admin Zero to Hero — Module 15 of 25
Record-Triggered Flow & Order of Execution
Every Flow so far has been manually run. This module makes automation truly automatic — firing the instant a record is created, updated, or deleted — and reveals the complete save-time sequence every record passes through.
Module 15 of 25 · Phase 4: Flow & Automation
🎯 What You Will Master in This Module
A Record-Triggered Flow fires automatically whenever a record is created, updated, or deleted — no user clicking Run required. This module covers exactly when and how these Flows fire, the critical before-save vs after-save distinction, and the full Order of Execution that ties together everything from Modules 11, 12, and 14 into one predictable sequence.
✓ Record-Triggered Flow configuration — trigger events and entry conditions
✓ Before-Save vs After-Save Flows — the single most important design decision
✓ Fast Field Updates — why before-save is dramatically more efficient for same-record changes
✓ $Record and $Record__Prior — accessing the triggering record's data directly
✓ Recursion — the classic Flow-triggers-itself trap and how to prevent it
✓ The complete Salesforce Order of Execution, top to bottom
✓ Building a real before-save Flow and reasoning through its exact execution timing
📋 In This Module
Concept 1 of 7
Record-Triggered Flow Configuration — Trigger Events and Entry Conditions
A Record-Triggered Flow is configured against ONE specific object and fires based on a chosen Trigger Event — record creation, update, or deletion — optionally narrowed further by Entry Conditions, so the Flow only actually runs for records matching specific criteria, not every single save.
⚡ Why This Matters
Without well-designed Entry Conditions, a Record-Triggered Flow evaluates on EVERY save of its object, even when the specific change it cares about did not happen — wasting processing time and, more importantly, potentially firing unwanted side effects on saves that have nothing to do with the Flow's actual purpose.
| Trigger Event | Fires When |
|---|---|
| A record is created | Only on brand-new record insertion — never on subsequent edits |
| A record is updated | Only on edits to an existing record — never on initial creation |
| A record is created or updated | Both scenarios — the most common choice when the same logic applies either way |
| A record is deleted | Only when a record is deleted — a separate trigger type from create/update |
🛠️ Hands-On: Create a Basic Record-Triggered Flow
1Setup → Flows → New Flow → select Record-Triggered Flow → Create
2Object:
Opportunity. Trigger: A record is created or updated.3Set Entry Conditions:
StageName Equals "Closed Won", and choose Only when a record is updated to meet the condition requirements (this option itself is a form of built-in ISCHANGED-style filtering).4Choose Run the flow only when a record is updated to meet the condition requirements if prompted — this ensures the Flow only fires on the actual TRANSITION into Closed Won, not every subsequent save of an already-Closed-Won record.
5Leave the canvas empty for now (just a Start element) → Save as
Opportunity Closed Won Handler, but do not activate yet — Concept 2 determines the remaining configuration.⚠️ Common Gotcha — Entry Conditions vs a Decision Element Inside the Flow
Entry Conditions determine whether the Flow STARTS running at all — evaluated before any canvas logic executes. A Decision element (Module 14) inside the Flow's canvas is different: it only controls branching AFTER the Flow has already started. Filtering with Entry Conditions is more efficient than starting the Flow unconditionally and immediately branching with a Decision, since Entry Conditions prevent unnecessary Flow interviews (executions) from beginning at all.
Concept 2 of 7
Before-Save vs After-Save — The Single Most Important Design Decision
Every Record-Triggered Flow runs at one of two distinct points relative to the actual database save: BEFORE the record is saved (Before-Save), or AFTER it has already been saved (After-Save). This single choice fundamentally shapes both what the Flow can do and how efficiently it does it.
⚡ Why This Matters
A Before-Save Flow changing a field on the SAME record is dramatically more efficient than an After-Save Flow doing the identical thing, because Before-Save changes are folded directly into the save that is already happening — no second database write required. Choosing the wrong one for a same-record field update is a genuine, measurable performance mistake.
| Before-Save Flow | After-Save Flow | |
|---|---|---|
| Timing | Runs BEFORE the record is committed to the database | Runs AFTER the record has already been saved |
| Can update fields on the SAME record? | Yes — extremely efficiently, folded into the same save (Fast Field Update, Concept 3) | Yes, but requires a SECOND, separate database update — less efficient |
| Can create/update OTHER records? | No — cannot perform DML on other objects | Yes — this is required for any cross-object automation |
| Can send emails, call Apex, post to Chatter? | No — these are After-Save-only capabilities | Yes |
| Best for | Defaulting or calculating fields on the triggering record itself | Anything touching other records, sending notifications, or external actions |
🛠️ Hands-On: Configure Your Flow as Before-Save
1Open your
Opportunity Closed Won Handler Flow from Concept 1.2In the Start element's configuration, find Optimize the Flow for → select
Fast Field Updates (this is what makes it a genuine Before-Save Flow).3Add an Update Records element directly on the canvas, choosing Update the record that triggered the Flow → set Probability to
100.4Save and Activate. Test by moving a real Opportunity to Closed Won → confirm Probability updates to 100 automatically, with no separate save action visible to the user — it happens as part of the same save.
5Note that this Update Records element is only ALLOWED to target the triggering record itself in a Before-Save context — attempting to update the related Account here would not be available as an option.
⚠️ Critical Gotcha — Before-Save Cannot Touch Other Records
A genuine Before-Save Flow (optimized for Fast Field Updates) is structurally restricted to updating ONLY the triggering record's own fields — it cannot create, update, or delete any OTHER record, and cannot perform actions like sending an email or invoking Apex. If a requirement needs to update a related Account when an Opportunity closes, that requirement needs an After-Save Flow instead, since Before-Save simply does not have the capability, regardless of how the Flow is otherwise configured.
Concept 3 of 7
Fast Field Updates — Why Before-Save Is Dramatically More Efficient
"Fast Field Updates" is Salesforce's own name for the Before-Save optimization path — when a Flow only needs to change fields on the SAME record that triggered it, running Before-Save avoids an entirely separate, second database transaction that an equivalent After-Save Flow would require.
⚡ Why This Matters
At scale — a bulk data load updating thousands of Opportunities at once (Module 10) — the difference between one database write per record (Before-Save) and two database writes per record (After-Save doing a redundant self-update) is a genuinely significant performance difference, and can be the difference between an operation completing smoothly and one hitting governor limits.
Before-Save (Fast Field Update):
Record is being saved
↓
Before-Save Flow runs, changes Probability field
↓
Record saves to database ONCE, already including
the Flow's Probability change ← ONE database write
After-Save doing the same thing (inefficient):
Record saves to database (write #1)
↓
After-Save Flow fires, detects the change, runs
an Update Records action on the SAME record
↓
Record saves to database AGAIN (write #2)
← TWO database writes for the exact same outcome
🛠️ Hands-On: Compare Before-Save and After-Save Side by Side (Conceptual)
1Clone your Concept 2 Flow (Save As) → name the clone
Opportunity Closed Won Handler - After Save Version2In the Start element, change Optimize the Flow for to
Actions and Related Records — this makes it an After-Save Flow.3Notice the Update Records element's options now ALSO allow choosing other objects, not just the triggering record — this extra capability is exactly the trade-off for the reduced efficiency discussed in this concept.
4Deactivate this After-Save clone (never activate two Flows doing the same thing on the same object simultaneously — Concept 5 covers why this specifically matters) → keep it only as a reference for comparing the two configurations side by side.
💡 A Single Object Can Have Both a Before-Save AND an After-Save Flow
It is entirely valid, and often the correct design, to have TWO separate Record-Triggered Flows on the same object — one Before-Save handling same-record field defaults efficiently, and a separate After-Save Flow handling cross-object updates or notifications. Splitting responsibilities this way, rather than cramming everything into one After-Save Flow, is considered good practice precisely because it lets same-record changes benefit from Fast Field Update efficiency.
Concept 4 of 7
$Record and $Record__Prior — Accessing the Triggering Record's Data
Inside a Record-Triggered Flow, the triggering record's current data is automatically available through the special
$Record global variable — no Get Records element needed to fetch it, since it is already right there. $Record__Prior similarly gives access to the record's values as they were BEFORE this specific save, directly mirroring Module 12's PRIORVALUE() concept, but for Flow rather than Validation Rule formulas.⚡ Why This Matters
Without $Record, every Record-Triggered Flow would need an unnecessary Get Records element just to re-fetch data the Flow already has direct access to — wasteful and slower. $Record__Prior is what makes "did this specific field actually change, and to what" logic possible directly within Flow, exactly like ISCHANGED()/PRIORVALUE() enabled in Validation Rules.
| Global Variable | What It Holds |
|---|---|
| $Record | The triggering record's CURRENT field values, as they exist at this point in the save |
| $Record__Prior | The triggering record's field values as they were BEFORE this save (only meaningful on Update triggers, not Create) |
🛠️ Hands-On: Use $Record__Prior for Change Detection
1Open your Concept 2 Before-Save Flow → add a Decision element right after Start.
2Label it
Did Stage Actually Change to Closed Won, with condition: $Record.StageName Equals "Closed Won" AND $Record__Prior.StageName Not Equal to "Closed Won".3Move your existing Update Records element (setting Probability to 100) so it only runs on this Decision's TRUE outcome.
4Save and test: an Opportunity already at Closed Won being saved again with an unrelated field change should NOT re-trigger the Probability update unnecessarily (though in this specific case it would harmlessly re-set the same value — this pattern matters more when the action has a genuine side effect, like sending a notification).
⚠️ Common Gotcha — $Record__Prior Is Not Meaningful on Create
On a brand-new record being created for the first time, there is no genuine "prior" state — $Record__Prior in this context generally reflects default/empty values rather than any real previous state, since the record did not exist before this save. Logic relying on $Record__Prior for change detection should typically be scoped to Update-triggered Flows, or explicitly guarded to behave sensibly during Create.
Concept 5 of 7
Recursion — The Classic Flow-Triggers-Itself Trap
Recursion happens when a Record-Triggered Flow's own action (updating a record) causes that SAME record to be saved again, which can re-trigger the SAME Flow, which updates the record again, potentially looping — in the worst case, an infinite loop that only stops when Salesforce forcibly halts it due to hitting recursion or governor limits.
⚡ Why This Matters
Recursion is one of the most common real-world Flow bugs, and can silently degrade performance or outright fail a save with a cryptic error if not understood and prevented deliberately. Recognizing WHY it happens, and how Salesforce's own built-in protections and design patterns prevent it, is essential before building any Flow that updates the record it was triggered by.
How recursion can happen:
Record-Triggered Flow (After-Save) on Opportunity:
"When Opportunity is updated, update its own Description field"
↓
Opportunity saves → Flow fires → updates Description
↓
That UPDATE is itself a save → could re-trigger the SAME
Flow again → updates Description again → triggers again...
Before-Save Flows updating the SAME record via Fast Field
Update do NOT cause this problem, since the change is folded
into the ORIGINAL save, not a new, separate one.
🛠️ Hands-On: Recognize a Recursion-Safe vs Recursion-Risky Design
1Recall your Concept 2 Before-Save Flow, updating Probability on the SAME record via Fast Field Update — this is inherently recursion-SAFE, because the update is folded into the original save, never triggering a second, separate save event.
2Recall your Concept 3 After-Save clone, which (if it were updating the same triggering record via a separate Update Records action) would be recursion-RISKY, since that Update Records action creates a genuinely new save that could re-invoke the same Flow.
3Salesforce does include built-in recursion protection for many common scenarios (a Flow generally will not re-trigger itself if the specific field values it would set are already identical to the current values), but relying entirely on this protection instead of deliberate design is not considered a best practice.
4The best practice takeaway: prefer Before-Save for same-record field changes specifically BECAUSE it avoids the recursion risk entirely, not just because it is faster — this is the same conclusion Concept 2 and Concept 3 reached from a pure efficiency angle, now reinforced from a safety angle too.
⚠️ Common Gotcha — Entry Conditions Are Also a Recursion Safeguard
Well-designed Entry Conditions (Concept 1) — especially "only when a record is updated to meet the condition requirements" — genuinely help prevent recursion, since the Flow will not re-fire on a subsequent save if the record already satisfies the condition and did not newly TRANSITION into it. This is another reason Entry Conditions deserve careful design, beyond simply the efficiency argument made in Concept 1.
Concept 6 of 7
The Complete Salesforce Order of Execution
Module 12 introduced a simplified version of this sequence. This concept presents the COMPLETE Order of Execution — the exact, predictable sequence Salesforce follows every time a record saves, tying together Validation Rules, Before-Save Flows, After-Save Flows, Assignment Rules, and more into one definitive timeline.
⚡ Why This Matters
This is one of the most heavily tested topics in Admin and Developer interviews alike, precisely because so much real troubleshooting depends on knowing what ran before what. Every "why did my Validation Rule not catch this" or "why did this Flow see an old value" question ultimately traces back to this exact sequence.
The Complete Order of Execution (save of an existing record):
1. Original record loaded from database, compared to submitted values
2. System Validation Rules (required fields, data type checks)
3. BEFORE-SAVE Record-Triggered Flows run (Concept 2)
4. Before triggers (Apex, if present) run
5. Duplicate Rules evaluate (Module 10)
6. Custom VALIDATION RULES evaluate (Module 12)
→ if any fail, the ENTIRE save is rolled back here
7. Record is saved to the database (but not yet committed)
8. After triggers (Apex, if present) run
9. AFTER-SAVE Record-Triggered Flows run (Concept 2)
10. Assignment Rules, Auto-Response Rules, Workflow Rules (legacy, Module 18)
11. Escalation Rules (Module 1)
12. Entitlement processes
13. Roll-Up Summary field recalculation on parent records (Module 8)
14. Criteria-Based Sharing Rule evaluation (Module 5)
15. Final commit to database — the save is now fully complete
🛠️ Hands-On: Trace a Realistic Multi-Layer Scenario
1Scenario: an Opportunity has a Before-Save Flow defaulting a blank Discount to 0 (Module 12's exact scenario), a Validation Rule rejecting Discount over 50, and an After-Save Flow sending an internal notification whenever Discount exceeds 20.
2Trace it: a user submits a save with Discount left blank. Step 3 in the Order (Before-Save Flow) sets it to 0. Step 6 (Validation Rule) checks the NOW-set value of 0, which passes (0 is not over 50). Step 7 saves. Step 9 (After-Save Flow) checks Discount, which is 0, so the notification does NOT fire, since 0 is not over 20.
3Now trace a second submission: Discount entered as 60. Step 3 (Before-Save) does nothing, since 60 is not blank. Step 6 (Validation Rule) correctly catches 60 > 50 and BLOCKS the entire save — steps 7 onward never happen at all for this attempt.
4This exercise demonstrates exactly why understanding the full Order of Execution — not just individual mechanisms in isolation — is what lets you correctly predict real, multi-layer automation behavior.
💡 Roll-Up Summary Recalculation Happens Relatively Late
Notice Roll-Up Summary Fields (Module 8) recalculate on the PARENT record only after the child record's own After-Save Flows have already run. This means an After-Save Flow on a child record generally cannot rely on an UPDATED Roll-Up Summary value on the parent within that same transaction — the roll-up has not recalculated yet at that point in the sequence.
Concept 7 of 7
Building and Timing a Real Before-Save Flow
This final concept builds one complete, realistic Before-Save Flow and explicitly reasons through its exact position in the Order of Execution, combining Concepts 1 through 6 into one practical, interview-ready demonstration.
⚡ Why This Matters
Being able to both BUILD a correctly-configured Before-Save Flow and EXPLAIN precisely where it sits in the Order of Execution relative to Validation Rules and other automation is exactly the combined practical-plus-conceptual skill this entire module has been building toward.
"Default Case Priority" Before-Save Flow:
Object: Case
Trigger: A record is created
Optimize for: Fast Field Updates (Before-Save)
[Start]
↓
[Decision: "Is Priority Blank?"]
↓ Outcome: Yes ($Record.Priority is null)
↓
[Update Records: set Priority on the
triggering record to "Medium"]
↓ Outcome: No (default) → do nothing, Priority
was already explicitly set by the user
Position in Order of Execution: this runs at STEP 3,
before Validation Rules (Step 6) ever see the record —
meaning a Validation Rule requiring Priority to be
non-blank would NEVER fire for a new Case, since this
Flow already guarantees it is filled in by the time
Validation Rules evaluate.
🛠️ Hands-On: Build This Flow and Verify the Timing Claim
1Setup → Flows → New Flow → Record-Triggered Flow → Object:
Case, Trigger: A record is created, Optimize for: Fast Field Updates.2Add a Decision checking
{!$Record.Priority} Is Null True → on the True outcome, add an Update Records element (triggering record) setting Priority to Medium.3Save as
Default Case Priority and Activate.4Now build a Validation Rule (Module 12 skill) on Case:
ISBLANK(Priority), Error Message: Priority is required.5Create a brand-new Case, deliberately leaving Priority blank → confirm the save SUCCEEDS, with Priority automatically showing Medium, and the Validation Rule never actually blocking anything — directly proving the Order of Execution timing claim from the diagram above, exactly as reasoned through.
⚠️ Module Wrap-Up — What Comes Next
You now understand Record-Triggered Flow configuration, the critical Before-Save vs After-Save distinction and its efficiency and recursion implications, $Record/$Record__Prior, and the complete Order of Execution that governs every save in Salesforce. Module 16 covers Advanced Flow Patterns — subflows for genuine reusability, Fault Paths for graceful error handling, and building automation that is genuinely robust in production, not just correct in the happy-path case.
💬 Module 15 Interview Questions (6)
Q1A requirement is simply "when an Opportunity's Amount changes, recalculate a Discount_Amount field on that same Opportunity." Should this be a Before-Save or After-Save Flow, and why?
This should be a Before-Save Flow, specifically configured with "Optimize the Flow for Fast Field Updates," because the entire requirement is scoped to updating a field on the SAME record that triggered the Flow, which is exactly the scenario Before-Save is designed to handle most efficiently. A Before-Save Flow folds this field change directly into the save that is already in progress, requiring only ONE database write total, whereas an equivalent After-Save Flow would need to perform a separate, second Update Records action after the initial save already completed, requiring two total database writes to achieve the identical outcome. Beyond the pure efficiency argument, using Before-Save here also avoids any recursion risk entirely, since the change is folded into the original save event rather than triggering a new, separate save that could potentially re-invoke the same Flow.
"Before-Save, optimized for Fast Field Updates — the requirement only touches the same record's own field, which Before-Save handles in a single database write folded into the original save, versus an After-Save Flow needing a separate second write, and Before-Save also avoids any recursion risk entirely."
Q2Why can't a Before-Save Flow update a related Account when an Opportunity closes, even though it can update the Opportunity's own fields freely?
A Before-Save Flow, specifically one optimized for Fast Field Updates, is structurally restricted to only modifying fields on the SAME record that triggered it — this is not a configuration option that can be adjusted, it is a fundamental capability boundary of that execution mode, which does not support creating, updating, or deleting any OTHER record, nor does it support other After-Save-only actions like sending emails or invoking Apex. This restriction exists because Before-Save Flows run at a point in the Order of Execution before the triggering record has even been committed to the database, and touching other records at that specific moment is outside the platform's supported before-save automation model. Any requirement needing to update a genuinely different record, such as a related Account, structurally requires an After-Save Flow instead, since only After-Save execution has the capability to perform DML against records beyond the one that triggered the Flow.
"Before-Save Flows are structurally limited to updating only the triggering record itself — this is a fundamental capability boundary, not a setting — because they run before the record is even committed; any update to a genuinely different record, like a related Account, requires an After-Save Flow instead."
Q3What is Flow recursion, and why are Before-Save Flows updating the same record inherently safer from this risk than After-Save Flows doing the equivalent update?
Flow recursion occurs when a Record-Triggered Flow's own action causes the same record to be saved again, which can potentially re-trigger that same Flow, creating a repeating cycle that in a worst case becomes an effectively infinite loop only stopped by Salesforce's own recursion or governor limit protections. Before-Save Flows updating the same record are inherently safer from this risk because their field changes are folded directly into the ORIGINAL save event that is already in progress — no new, separate save transaction is created, so there is no additional save event that could re-invoke the Flow. An After-Save Flow performing the equivalent same-record update, by contrast, must use a separate Update Records action AFTER the initial save has already completed, and this action itself constitutes a genuinely new save event, which could potentially re-trigger the same After-Save Flow if its entry conditions still match, creating the exact recursive cycle that Before-Save's folded-in approach avoids entirely by design.
"Recursion happens when a Flow's own update re-triggers itself through a new save event — Before-Save avoids this because its changes are folded into the ORIGINAL save with no new save event created, while an equivalent After-Save update requires a genuinely separate save transaction that could re-invoke the same Flow."
Q4An org has a Before-Save Flow that defaults a blank Case Priority field to "Medium," and a Validation Rule that requires Priority to be filled in. A user creates a Case with Priority left blank, and the save succeeds with Priority showing "Medium." Explain why the Validation Rule never blocked this save.
This happens because of where each mechanism sits in the Order of Execution: Before-Save Record-Triggered Flows run at an earlier point in the sequence, specifically before Custom Validation Rules evaluate. By the time the Validation Rule checks whether Priority is blank, the Before-Save Flow has already run and defaulted the field to "Medium," meaning the record's actual state at the point the Validation Rule evaluates no longer has a blank Priority field at all — the Validation Rule is correctly checking the CURRENT record state, which reflects the already-defaulted value, not the user's original blank submission. This is not a malfunction of either mechanism; both are working exactly as designed, but their combined effect is that the Validation Rule can never actually catch a blank Priority in this specific configuration, since the Before-Save Flow's defaulting logic always resolves the blank condition before the Validation Rule has any opportunity to evaluate it.
"Before-Save Flows run earlier in the Order of Execution than Validation Rules — by the time the Validation Rule checks for a blank Priority, the Before-Save Flow has already defaulted it to Medium, so the Validation Rule correctly sees a non-blank value and never fires, even though the user's original submission was genuinely blank."
Q5What is the difference between $Record and $Record__Prior inside a Record-Triggered Flow, and in what scenario would $Record__Prior not be meaningful?
$Record gives direct access to the triggering record's CURRENT field values at that point in the Flow's execution, while $Record__Prior gives access to the record's field values as they existed BEFORE this specific save occurred, allowing the Flow to compare old versus new values without needing a separate Get Records element, directly mirroring the role PRIORVALUE() plays within Validation Rule formulas. $Record__Prior is not meaningful on a Create-triggered Flow, because a brand-new record being created for the very first time has no genuine prior state to reference — the record did not exist before this save, so $Record__Prior in this context would generally reflect default or empty values rather than any real previous state. Logic that depends on comparing old versus new values using $Record__Prior should therefore be scoped specifically to Update-triggered Flows, where a genuine prior state actually exists to compare against.
"$Record holds the triggering record's current values; $Record__Prior holds its values before this save, enabling old-versus-new comparisons without a Get Records element. $Record__Prior is not meaningful on Create, since a brand-new record has no genuine prior state to reference."
Q6Walk through the complete Order of Execution for a record save, and explain specifically where Before-Save Flows, Validation Rules, and After-Save Flows each sit relative to one another.
The sequence begins with the original record being loaded and compared against submitted values, followed by system-level validation such as required field and data type checks. Before-Save Record-Triggered Flows run next, along with any before-triggers if Apex is present, meaning they execute early enough to modify the record's field values before anything downstream evaluates them. Duplicate Rules evaluate next, followed by Custom Validation Rules, which critically run AFTER Before-Save Flows have already had a chance to modify the record — meaning Validation Rules always see the post-Before-Save-Flow state of the record, not the raw, originally-submitted values, and if any Validation Rule fails at this point, the entire save is rolled back and nothing further in the sequence happens. Assuming validation passes, the record is saved to the database, after which after-triggers run, followed by After-Save Record-Triggered Flows, meaning After-Save Flows only ever see a record that has ALREADY successfully passed all Validation Rules and been committed — they cannot prevent a save the way Validation Rules can, since by the time they run, the save has already succeeded. The sequence continues with legacy Assignment/Auto-Response/Workflow Rules, Escalation Rules, Entitlement processes, Roll-Up Summary recalculation on parent records, and Sharing Rule evaluation, before the final commit completes.
"Before-Save Flows run early and can still shape what Validation Rules ultimately see; Validation Rules run next and can still block the entire save; only after validation passes and the record is committed do After-Save Flows run — meaning After-Save Flows always see an already-validated, already-saved record and cannot prevent the save the way Validation Rules can."
📝 Module 15 Recap — Record-Triggered Flow & Order of Execution Mastered
✅ Entry Conditions filter whether a Flow starts at all — more efficient and safer than starting unconditionally and branching with a Decision
✅ Before-Save (Fast Field Updates) can only touch the triggering record's own fields, but does so with a single, efficient database write
✅ After-Save can touch other records, send emails, and call Apex — but any same-record update costs a second, separate database write
✅ $Record and $Record__Prior give direct access to current and pre-save field values — $Record__Prior is not meaningful on Create
✅ Recursion happens when a Flow's own update triggers a new save that re-invokes the same Flow — Before-Save avoids this by design
✅ The complete Order of Execution: Before-Save Flows → Validation Rules → save/commit → After-Save Flows → Rollups → Sharing Rules
✅ Validation Rules always see the POST-Before-Save-Flow record state — this single fact resolves most "why didn't my rule fire" questions
🎯 Module 15 Practical Checklist — Complete These in Your Org
1. Build a Before-Save Flow on Opportunity that sets Probability to 100 when Stage becomes Closed Won.
2. Add a Decision using $Record and $Record__Prior to only act on the genuine transition into Closed Won.
3. Build a comparable After-Save Flow configuration and compare its Update Records options against the Before-Save version.
4. Build the Default Case Priority Flow plus a matching Validation Rule, and directly verify the Order of Execution timing claim.
5. Trace the multi-layer Discount scenario from Concept 6 on paper before testing it live.
Module 16 covers Advanced Flow Patterns — subflows, Fault Paths, and building automation that is genuinely robust in production.
2. Add a Decision using $Record and $Record__Prior to only act on the genuine transition into Closed Won.
3. Build a comparable After-Save Flow configuration and compare its Update Records options against the Before-Save version.
4. Build the Default Case Priority Flow plus a matching Validation Rule, and directly verify the Order of Execution timing claim.
5. Trace the multi-layer Discount scenario from Concept 6 on paper before testing it live.
Module 16 covers Advanced Flow Patterns — subflows, Fault Paths, and building automation that is genuinely robust in production.
Test yourself on this topic
2,244 practice MCQs across 27 quizzes — 5 quizzes free, no signup
RK
Written by
Rajnish Kumar
Salesforce Developer · Apex, LWC, Data Cloud & AI · Building SF Interview Pro
Keep Preparing
Practice with real people
Join the free Mock Interview Community — practice with peers, get honest feedback, and walk into your real interview confident.
Join the Community ↗