Read the screenplay: FANNIEGATE — $7 trillion. 17 years. The biggest fraud in American capital markets.
#1🔄 FlowsCareer-Ending

The Infinite Flow Loop That Ate Production

Record-triggered flow updates the same object. Flow fires again. And again. And again.

What Happened

I built a record-triggered flow on Opportunity that updated a rollup field on the same Opportunity. Seemed harmless. Deployed on a Tuesday afternoon. Within 30 seconds, every Opportunity edit in the org triggered an infinite loop that burned through our CPU limits and locked out the entire sales team at Mobilization Funding for two hours.

The Wrong Way

// Record-Triggered Flow on Opportunity (After Save)
// Entry Criteria: ISCHANGED({!$Record.Amount})
// Action: Update Records → Current Opportunity
//   Set StageName = "Negotiation" if Amount > 50000
// Problem: This update triggers the SAME flow again,
// because the record was updated, and the flow
// has no recursion guard.

The Right Way

// Record-Triggered Flow on Opportunity (After Save)
// Entry Criteria: ISCHANGED({!$Record.Amount})
//   AND {!$Record.Amount} > 50000
//   AND {!$Record.StageName} != "Negotiation"
// ^^^ This condition prevents re-entry because after
// the first run, StageName IS "Negotiation"
//
// Also: Flow Settings → "Run flow in a transaction
// with the original DML operation"
// And toggle OFF "Allow this flow to re-trigger"

The Lesson

Every record-triggered flow needs an exit condition that prevents re-entry. If you update the same object, you MUST check that the value isn't already what you're setting it to.

Don't make this mistake.

Hire someone who already did.

View Consulting →

Enjoyed this? Get more like it.

Glen's Musings — AI, investing, and building things. Occasional. Free.

More Flows Mistakes