Anyone ever had to disable a Flow using a script?

DrewW
Mega Sage
Mega Sage

When we clone we have a scheduled Flow that we need to disable in our subprod instances.  I was thinking of just using a script but I don't see a method for it.

I thought about just marking Active=false in the sys_hub_flow table but was not sure if that was a good plan or not.

 

Has anyone else had to do this?

 

5 REPLIES 5

Bert_c1
Kilo Patron

You can try using a "Clone Cleanup Script", that will run as a onDemand scheduled job in the target instance after the clone.

 

post-clone-cleanup-scripts

 

The last I knew those run as the 'system' user, if that is a problem, then there is a way have the script run as another user on the target instance.

I agree but is it a good idea to just set the record in the sys_hub_flow table as active=false?

I don't know that feature (Flows), I don't wee why not. You can test. Those are no-code alternatives to Business rules I thought.

Ya, I was just trying to not find out the hard way that its a bad idea because I may need to do other updates to the flow in Dev when changes are needed.