How to Delete a Flow in Salesforce

In Salesforce CRM, flow management requires to remove the unnecessary flows from the list of flows. This is required to manage the space and it is also needed to delete an unused flow when you are creating a flow similar to the unused flow to avoid confusion.

In this Salesforce tutorial, we will learn how to delete a flow in Salesforce.

Considerations To Delete Flow in Salesforce

We should be aware of the following considerations while deleting a flow in Salesforce.

  • The flow can only be deleted when the package state is unmanaged, and if it is managed, then you need to delete the installed managed package to delete the flow.
  • The flow and versions in the flow should be deactivated to delete the flow.
  • You should have the required access and permissions to manage the flows.
  • The flow should not be referred to any page or button. If so, remove the flow from the page or delete the button that is calling the flow.

Delete a Flow in Salesforce

To delete a Flow in Salesforce, login to your Salesforce developer console and follow the below steps.

1. On the Setup page of Salesforce, go to the Quick Find box and then search and select Flows under the heading Process Automation.

How to delete a Salesforce flow

2. In the Flows window, go to the unmanaged Salesforce flow that you want to delete, and there, click on the dropdown of that flow and select View Details and Versions.

Delete a Screen flow in Salesforce

3. In this window, go to the section Flow Versions and deactivate all activated flow versions. For that, click on the Deactivate button in the Action column.

How to deactivate flow versions in Salesforce

4. After deactivating the flow versions, go to the section Flow detail and click the Delete button.

How to delete flows in Salesforce

5. As we click on the Delete button, a pop-up window will appear, displaying the message of confirmation to delete the flow. Here, click on the OK button.

Delete an Activated flow in Salesforce

As we click on the OK button, the flow will be deleted.

See also  How to Automate Assets Creation using Flows in Salesforce

This way, we can delete a Flow in Salesforce by following the above steps.

Error while deleting a Flow

If you face the error unable to complete the requested change that means this flow is currently deployed on the page layout of any object.

You will see the reason for the error, and in the Section column, you will see the page where the flow is deployed right now.

Error while deleting a Salesforce flow

1. In this case, the flow is deployed on the Home page of an app, so navigate to the home page of that app, click on the settings icon at the top, and select the option Edit page.

Unable to complete requested change in deleting Salesforce flow

2. In the app builder, delete the flow component and click Save to apply changes.

Salesforce flow delete error

3. If you have called this flow with a button, navigate to Object Manager -> Object Name -> Button, Links, and Actions. Then, delete the button that is calling the flow.

Delete the flow button from the page layout in Salesforce

4. After this, remove the button from the Page layout also.

Delete a flow from references in Salesforce

After making the above changes, the flow will removed from the references. Now, go to the Flow details section of the flow and click Delete, and this time, you won’t face any error while deleting the flow.

Conclusion

In Salesforce flow management, we should avoid deleting important flows deployed in any automation process. By following the above steps, we can maintain the Salesforce flows in order by securely deleting flows that are no longer needed.

Now, you might have understood the method to delete a Salesforce flow and also the way to resolve the error that can occur while deleting a Flow.

See also  How to Create Roll-Up Summary Field using Salesforce Flow

You may like to read: