To stop a recursive Salesforce flow, make it run only when the record reaches the state that matters, and use a before-save record-triggered flow for changes limited to that same record. Before-save assignments update the triggering record as part of its original save, avoiding a separate Update Records operation and its extra save cycle. Use after-save when you need the saved record ID, must change related records, or need another post-save action.
“Flow runs twice,” repeated actions, duplicate business records, and the Maximum number of duplicate updates in one batch (12 allowed) error are different problems. The right fix depends on which one you have.
As an Amazon Associate I earn from qualifying purchases.
First identify what is happening
“Duplicate update” can describe several distinct symptoms. Identify the object, trigger, fields, and exact repeated action before changing a flow.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Recursive automation: a flow, trigger, or another automation updates a record and causes automation to run again.
- Repeated actions: an email, task, or other action occurs more than once, even if the record itself is not duplicated.
- Duplicate business records: multiple records represent the same real-world entity or event. This calls for duplicate matching or validation, not just a recursion guard.
- Scheduled-update batch error: Salesforce reports Maximum number of duplicate updates in one batch (12 allowed). This is a specific scenario involving scheduled actions from flows with Wait steps, not a general limit on record updates.
Note whether the symptom occurs after a UI edit, import, API update, or another automation. Different entry paths can expose the same underlying re-entry.
#1 Best Overall
Choose before-save or after-save for the work
The key design question is whether the flow only changes fields on the record that triggered it, or must perform work after that record has been saved.
| Pattern | Use it when | What it means for updates | Supported elements and limits |
|---|---|---|---|
| Before-save record-triggered flow | You need to set or change fields on the triggering record only. | Assign values to $Record; Salesforce saves them with the original transaction, avoiding a separate same-record DML update and another automation pass. |
Supported elements include Assignment, Decision, Get Records, and Loop. It cannot perform related-record DML or other post-save actions. See Salesforce Help: Before-Save Record-Triggered Flows. |
| After-save record-triggered flow | You need the assigned record ID, must create or update related records, or need another post-save action. | It runs after the triggering record is saved. If it updates that same record, the additional update can cause automation to run again, so narrow conditions are especially important. | Choose this type for capabilities that require a saved record or work beyond changing the triggering record. See Salesforce Help: Start an Automation When a Record Is Created or Changed. |
Salesforce says a before-save record-triggered flow can update a record 10 times faster than a record-change process; that comparison is Salesforce’s documented context, not a general performance guarantee for every flow. The practical design benefit here is avoiding a second save when only the triggering record’s fields need changing. See Salesforce Help.
Make the flow run only for the meaningful change
Set precise Start conditions
In Flow Builder, configure the Start element’s object, trigger, and entry conditions for the event that represents the business outcome. Do not make an update-triggered flow run for every edit if it only needs to act when a particular field or status changes. Start criteria can use AND, OR, custom condition logic, or a formula. Salesforce’s guidance on record-triggered flow setup is in Start an Automation When a Record Is Created or Changed and Getting Started with Record-Triggered Flows.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteRank #2
Check whether the relevant field actually changed
If broad criteria let unrelated edits re-run the work, compare the current value with the prior value. A formula can compare $Record to $RecordPrior so the flow proceeds only when the field that matters changed. Validate the formula for the flow’s trigger and the field types involved before activating it.
For an update-triggered flow, configure it to run only when the record is updated to meet the condition requirements when that matches the desired state transition. For example, an action intended for a newly approved record should be gated on the move into the approved state, rather than on every later edit while the status remains approved. Salesforce Architects recommends comparing new and prior values as a precise recursion-control pattern; see Record-Triggered Automation | Platform Decision Guides.
Prefer meaningful change checks over a blanket recursion flag
A static flag can be appropriate for some Apex designs, but it is not a substitute for precise flow criteria. Salesforce’s architecture guidance favors checking whether the field relevant to the automation changed rather than relying on a broad trigger or a static recursion flag for this flow-and-Apex design concern. Flow does not share state across different flow triggers or repeated invocations; Apex provides more control when complex transaction-scoped state or deduplication is required. See Salesforce Architects’ guidance.
Trace every automation path on the object
A flow that appears to run twice may be responding to an update from another component, not repeating itself in isolation. Inspect automation on the object and the fields involved, including the route by which the record is changed.
- Before-save and after-save record-triggered flows
- Apex triggers
- Process Builder processes and workflow field updates
- Other flows, imports, API integrations, and upstream systems
As the number of entry points grows, coordinating behavior becomes harder. Salesforce’s architecture guidance recommends choosing a primary entry point as application scope and complexity grow. Salesforce’s getting-started guidance also recommends testing in a sandbox before activation: Getting Started with Record-Triggered Flows.
Coordinate multiple flows without using order as a recursion fix
When several record-triggered flows on the same object and of the same type need to run in a defined sequence, assign trigger order values. Salesforce permits values from 1 to 2,000 for before-save or after-save record-triggered flows. Ordering does not override the platform’s overall order-of-execution rules, and it does not make a flow’s criteria idempotent or remove an unnecessary second update. Flows without trigger-order values follow Salesforce’s documented ordering rules, including activation date where applicable. Details: Define the Run Order of Record-Triggered Flows for an Object.
Rank #4
Handle the “12 allowed” error as a scheduled-action problem
Salesforce’s Maximum number of duplicate updates in one batch (12 allowed) error concerns duplicate scheduled actions, including waiting interviews, in a batch for a flow with a Wait step. Repeated bulk updates can create multiple flow interviews that schedule actions for the same record. The 12 figure belongs to this documented error scenario; it is not a universal limit on how many times a record may be updated.
Salesforce’s guidance is to add more specific entry criteria so the flow runs only when an update is needed, and to avoid repeatedly updating the same record in one bulk operation. Examine how many times the record is updated in that operation and whether each update truly needs to create another waiting interview. See Salesforce Help: Flow Error: ‘Maximum number of duplicate updates in one batch (12 allowed)’ (published June 19, 2026).
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRecognize related problems that need a different fix
Duplicate business records need duplicate prevention
If two records represent the same enrollment, customer, or event, prevent or detect duplicate data using matching or validation logic. A before-save flow can help enforce data quality—for example, Salesforce documents a before-save flow that blocks a duplicate enrollment with a custom error. That solves duplicate data, not automation re-entry. See Create a Before-Save Flow for Better Data Quality.
Best Value
Legacy Process Builder recursion can repeat criteria evaluation
Salesforce documents that Process Builder’s “only when specified changes are made” criteria can evaluate more than once during recursive re-evaluation within a transaction, because each pass uses that pass’s prior values. If a legacy process is part of the path, inspect its criteria and the updates that cause another evaluation. See Salesforce Help: Recursive Process evaluates ‘only when specified changes are made’ more than once (published July 17, 2026).
An Apex trigger can re-fire after a workflow field update
Salesforce documents Apex trigger re-entry after a workflow rule updates a field, when that field actually changes. This is an Apex and workflow interaction, not proof that a record-triggered flow itself is malfunctioning. Gate the logic on the specific meaningful change and review the full automation path. See Salesforce Help: Avoid Triggers from firing twice in a transaction (published June 8, 2026).
A practical troubleshooting sequence
- Describe the symptom. Record the object, trigger type, relevant fields, entry path, and exact repeated action. Decide whether the issue is same-record re-entry, duplicate actions, duplicate business records, or the scheduled-update batch error.
- Map the automation. Inspect flows, Apex triggers, Process Builder, workflow field updates, integrations, and imports that read or write the fields involved.
- Remove avoidable same-record DML. If the flow only changes fields on the triggering record, replace an after-save Update Records operation with before-save assignments where the required behavior is supported.
- Narrow the trigger. Set Start criteria for the actual event or state transition; compare the current and prior value of the field that matters when unrelated edits should not run the logic.
- Set flow order where sequencing is genuinely needed. Use trigger order to coordinate flows of the same type on the object, not to compensate for broad criteria or repeat updates.
- Test realistic entry paths in a sandbox. Exercise UI edits and, where relevant, imports and API updates. Confirm both the intended action and that unrelated edits do not invoke it before activation.
For more complex automation, assess how many entry points exist, cross-object operations, custom error-handling needs, bulk behavior, and whether transaction-scoped state or deduplication is necessary. Flow bulkifies automatically, but does not share state across different flow triggers or repeated invocations; Apex may offer greater control for complex cases. Neither choice removes the need to define precisely which change should cause the business action. See Salesforce Architects: Record-Triggered Automation.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




