Skip to main content

Tried SOQL but I dont know where i got it wrong. Not sure how to bulk inactivate and delete all flows.

2 respostas
  1. 21 de dez. de 2024, 04:04

    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());

0/9000