Fast updates before, actions after
Before-save for same-record fields, after-save for everything else, entry conditions to run only when needed, and scheduled or asynchronous paths for later work.
- TimingBefore vs after save and order of execution.
- ConditionsEntry conditions, $Record and $Record__Prior.
- Later workScheduled and asynchronous paths.
Record-triggered flows replace triggers for most declarative automation, so they dominate Flow interviews. Know when to use fast field updates (before save) versus actions and related records (after save), and how to run only when it matters.
1. Before-save vs after-save — when do you use each?
Optimise the flow for…
What does the flow change?
- Fields on the same record→ Fast Field Updates (before save): no extra DML, up to 10× faster
- Related or other records, emails, actions, subflows→ Actions and Related Records (after save)
- Something later or a callout→ After save with a scheduled or asynchronous path
In a before-save flow you simply assign values to $Record; there is no Update Records element needed for the triggering record.
2. Where do flows sit in the order of execution?
Save order (simplified)
- Before-save flowsFast field updates
- Before triggersApex
- Validation & duplicate rulesBlock bad data
- Save + after triggersApex
- After-save flowsRelated records, actions
- CommitThen async paths, emails
3. What are entry conditions and why do they matter?
Entry conditions decide which records start the flow. Combine them with “Only when a record is updated to meet the condition requirements” so the flow runs once when, say, Stage becomes Closed Won — not on every later edit. This saves resources and prevents duplicate actions.
4. What are $Record and $Record__Prior?
$Record is the triggering record with its new values; $Record__Prior holds the values before the update (available in update-triggered flows). Compare them in a Decision to act only when a field actually changed — for example $Record.OwnerId != $Record__Prior.OwnerId.
Decision: Owner changed?
Condition: {!$Record.OwnerId} Does Not Equal {!$Record__Prior.OwnerId}
→ Send email to the new owner
→ Create Task "Review handed-over account"5. What are scheduled paths and asynchronous paths?
Scheduled paths run later relative to the trigger time or a date field — “3 days before Close Date, remind the owner”. An asynchronous path runs right after commit in a separate transaction — required for callouts and useful for heavy work that should not slow the user's save.
6. How do you control the order of several flows on one object?
Set the Trigger Order value (1–2,000) on each record-triggered flow; flows with lower numbers run first within the same before- or after-save phase. Use Flow Trigger Explorer to see all flows for an object and event in one place.
7. Can a record-triggered flow run on delete?
Yes — a “record is deleted” flow runs before the deletion, so you can read $Record and create logs or update related records (for example, adjust a parent count). It cannot stop the delete; use a validation or Apex for that.
8. How do you prevent a flow from re-triggering itself?
Use entry conditions with “only when updated to meet the condition”, compare $Record with $Record__Prior, and prefer before-save field updates (which do not re-run the save). Flows re-run on the same record at most once per transaction cycle when an after-save flow updates it, so guard updates with conditions.
Remember
Key points
- Same record → before save
No DML and much faster.
- Run only on change
“Updated to meet the condition”.
- $Record__Prior
Detect real changes.
- Callouts → async path
Never in the synchronous save.
Interview drill
Follow-up questions
What the interviewer asks after your first answer. Turn on practice mode, answer each one aloud, then reveal.
-
1 Can a before-save flow create a related record? Basic
No — before-save flows can only update the triggering record; use after-save for related records.
-
2 Can a before-save flow send an email? Basic
No — actions such as emails need an after-save flow.
-
3 How do you run a flow only for records created by users, not integrations? Intermediate
Add an entry condition or Decision on
$Profile.Nameor a custom permission check, or bypass with a custom setting for integration users. -
4 What happens if a scheduled path date field changes? Advanced
Pending scheduled actions are re-evaluated; if the record no longer meets the criteria or the date moves, the scheduled path is rescheduled or cancelled.
-
5 Do record-triggered flows run on data loads? Basic
Yes — they run for API and Data Loader operations in bulk, like triggers.
-
6 How do you see which flows ran on a record save? Intermediate
Use debug logs (Workflow category) or Flow Trigger Explorer for the configured order; debug individual flows with the Debug option.