TransWikia.com

Mass Delete flow and flow versions

Salesforce Asked by Ghosty on January 7, 2021

I’m trying to delete some old flow which are inactive via workbench.

DestructiveChanges.xml

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Advanced_Round_Robin</members>
        <name>Flow</name>
    </types>Ï
</Package>

package.xml

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">    
  <version>48.0</version>
</Package>

I’ve added both file in zip and in workbench when I deploy using this zip file I get below error.

insufficient access rights on cross-reference id

enter image description here

What permission I need to have to perform this action?

Also is there way I can delete few version of same flow only? Like keep only last 3-4 version and delete all previous version of given flow?

Thank you.

One Answer

I have experienced this issue in the past. According to this release doc, version numbers of the flow are omitted in API 44.0+. However when you try to do a destructive change deployment to delete a version of the flow using API 44.0 or higher it lets you delete ONLY if the version number is appended to the flow name.

For example -- If your destructive changes look like below, with hyphenated version number, it will be deleted

<types>

  <members>FlowName-4</members>

  <name>Flow</name>

 </types>

The Salesforce product team has confirmed this as expected behavior. The documentation says “To deploy or retrieve a version, you can specify the version number. For example, sample flow-3 specifies version 3 of the flow whose unique name is sample flow. If you don’t specify a version number, the flow is the latest version.”

Correct answer by Anudeep Gopagoni on January 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP