0

How to deactivate/delete flow through WorkBench API or Apex? I tried all possible ways. could anyone help out here?

3
  • The config switch on cloudtoolkit.co can do it. Can you explain the scenario in more detail (why via API/Apex), then we might be able to suggest differently.
    – Girbot
    Jun 17, 2022 at 6:49
  • @Girbot The requirement is in the org they have some set of flows. Now they want a separate custom UI with additional description to display all the active flows. if they want to deactivate any flow they can do this with one button click
    – jose
    Jun 17, 2022 at 6:55
  • This would be something like out of box functionality.
    – Vinay
    Jun 17, 2022 at 7:10

1 Answer 1

0

Use Workbench to retrieve metadata components and deactivate a flow, Once you retrive download those components in a .zip file and modify the flowDefinition file by specifying a value of 0 in activeversionNumber.

<?xml version ="1.0" encoding="UTF-8"?>
<FlowDefinition xmlns="http://soap.sforce.com/2006/04/metadata">
    <activeversionNumber>0</activeversionNumber>
</FlowDefinition>

Re-zip and then deploy the modified flowDefinition file.
Check more details here. For mass delete of flows check steps mentioned.

Use Ben Edwards tool 'https://sfswitch.herokuapp.com' to disable process using toggle.

enter image description here

Thanks

2
  • the following error I am getting in workbench message: You must provide a valid Metadata field for InteractionDefinitionVersion
    – jose
    Jun 17, 2022 at 7:52
  • Can you share packge.xml, metadata file pls
    – Vinay
    Jun 17, 2022 at 9:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .