function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Glenn Nyhan 54Glenn Nyhan 54 

Turning off a Process Builder Process Manually

Can a Process Builder Process be turned off manually keep it from firing) using let's say a checkbox if you don't want to fire? Or maybe a Flow script that gets trigger manually? 
NagendraNagendra (Salesforce Developers) 
Hi Glenn,


Ben Edwards has a set of tools which includes one called Salesforce Switch, which enabled you to do this. He has also put the source code on GitHub: Also, there is a lightning component to allow on mass enable/disable: At it's core, it uses the Tooling API.

Getting Flow/Process Info
GET: /services/data/v43.0/tooling/query?q=Select+Id,ActiveVersion.VersionNumber,LatestVersion.VersionNumber,DeveloperName+From+FlowDefinition+ORDER+BY+DeveloperName
Updating Flow/Process Info
POST: /services/data/v43.0/tooling/sobjects/FlowDefinition/{FlowId}/?_HttpMethod=PATCH
With JSON:
{ 'Metadata': { 'activeVersionNumber': {versionNumber/null} } }
NOTE: the ?_HttpMethod=PATCH is only required if you're calling from Apex.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
Raj VakatiRaj Vakati
Not by default .. 

But you can do one small trick .. 

Create a checkbox on the user ( by pass process __c )

Check this checkbox is checked or not .. If check box is not checked then only execute the process builder actions 

User-added image 
Glenn Nyhan 54Glenn Nyhan 54
Hi Guys,

Wow, these are both great answers and much appreciated. Let me try them out and get back on which answer was best, even though they both fit my need.