Tried SOQL but I dont know where i got it wrong. Not sure how to bulk inactivate and delete all flows.
2 件の回答
List<FlowDefinition> flows = [SELECT Id, ActiveVersionId FROM FlowDefinition WHERE ActiveVersionId != null];
for (FlowDefinition flow : flows) {
flow.ActiveVersionId = null; // Deactivates the flow
}
update flows;
System.debug('Flows inactivated: ' + flows. Size());