Why setWorkflow(false) Didn’t Stop All Automation

Matthew_13
Tera Guru

Problem
I used setWorkflow(false) expecting it to prevent all business rules, flows, and other automation from running during an update. However, I still saw certain logic executing, which was confusing.

Solution
The key realization is that setWorkflow(false) does not disable all automation.

What it actually does:

  • Skips most Business Rules

  • Prevents Workflow execution

  • Does not stop everything such as all Flow Designer actions, engine-level logic, or certain platform processes

This explains why some automation can still run even when setWorkflow(false) is set.

Why this matters
If you’re:

  • Performing bulk updates

  • Writing fix scripts or background scripts

  • Trying to control automation side effects

Relying solely on setWorkflow(false) can lead to unexpected behavior.

Takeaway
To control automation more reliably:

  1. Understand which automation types are affected by setWorkflow(false)

  2. Use conditional checks inside rules/flows when appropriate

  3. Test updates in a controlled environment before assuming automation is fully suppressed

Sharing this since it’s a common assumption and not always obvious from documentation.

 

*Please give a Thumbs up if you find Helpfuls. Thanks My Friend!

0 REPLIES 0