Anyone ever had to disable a Flow using a script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 09:18 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 10:17 AM
You can try using a "Clone Cleanup Script", that will run as a onDemand scheduled job in the target instance after the clone.
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 10:32 AM
I agree but is it a good idea to just set the record in the sys_hub_flow table as active=false?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 10:43 AM - edited 05-03-2024 10:44 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 10:58 AM
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.