Skip to content

deleteFlows

deleteFlows(connection, flowNames, options?): Promise<FlowDeleteResult>

Defined in: flowDelete.ts:47

Deactivates and hard-deletes every version of the named Flows — the pre-step a destructive metadata deploy needs, since Salesforce won’t remove a Flow that still has an active version.

Each distinct FlowDefinition is deactivated once (activeVersionNumber = 0), then every Flow version is destroyed, whether or not its deactivation succeeded. A requested name with no Flow in the org is a deactivate failure. Per-item failures are collected into failures, never thrown; a failed query rejects.

Connection

The org to delete the Flows from.

readonly string[]

Flow DeveloperNames. An empty list returns an empty result without touching the org.

DeleteFlowsOptions = {}

Optional stage callback.

Promise<FlowDeleteResult>

Which Flows were deactivated, one deleted entry per version destroyed, and any failures.