Skip to main content
Ridgetech Admin 님이 #Salesforce Developer에 질문했습니다

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

답변 2개
  1. 2024년 12월 21일 오전 4: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