How to deactivate/delete flow through WorkBench API or Apex? I tried all possible ways. could anyone help out here?
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>
Use Ben Edwards tool 'https://sfswitch.herokuapp.com' to disable process using toggle.