How to Build portfolio site using Salesforce Experience Cloud

How to Delete a Flow in Salesforce

Salesforce flows help automate tasks and improve how users interact with the system. Sometimes, you may need to remove old or unused flows. Luckily, Salesforce offers different ways to delete these flows, depending on your needs.

In this blog post, we’ll explain the various methods to delete flows in Salesforce through the user interface and using code, so you can easily manage your flows.

Understanding Flow Versions:

Salesforce creates a new version every time you save changes to a flow. This version control is helpful but can cause clutter if you don’t manage the older versions.

Deleting Flows from UI:

Select Your Flow: Log in to Salesforce and click the gear icon (top right) to open Setup. In the search bar, type “Flows” and select it under Process Automation.

Select the “View Details and Versions” option for the flow you want to delete.

If it’s currently being used (active), click Deactivate.

Delete the Flow: Click the Delete button next to the flow name. This removes the entire flow, including all versions.

To delete an individual version, click the “Del” link for that specific version.

Want to Learn Salesforce Flows? Checkout our Salesforce Flow Course

Using Salesforce Inspector:

Salesforce Inspector, a handy Chrome extension, simplifies data management within Salesforce. Here’s how to use it to delete unwanted flows:

Install the Extension:

Open Google Chrome and head to the Chrome Web Store. Search for “Salesforce Inspector” and click “Add to Chrome.” Confirm the installation with “Add Extension.”

Data Export:

Once installed, you’ll see the Salesforce Inspector icon in your Chrome toolbar. Click it to open the sidebar and click “Data Export” to access your Salesforce flows.

 

Fetch the required flow:

Using the following SOQL fetch the required flow where ‘Project_Limit_Exhausted_notification’ is the API Name of the flow:

SELECT DurableId, FlowDefinitionView.ApiName, Label, FlowVersionView.VersionNumber, Status FROM FlowVersionView WHERE FlowDefinitionView.ApiName=’Project_Limit_Exhausted_notification’

 

Here, we can see both the active and obsolete versions. To delete the obsolete and draft versions, filter the query using the Version number.

SELECT DurableId, FlowDefinitionView.ApiName, Label, FlowVersionView.VersionNumber, Status FROM FlowVersionView WHERE FlowDefinitionView.ApiName=’Project_Limit_Exhausted_notification’ AND VersionNumber<4

From the Export Result, Copy the Excel format of the file and import it using the Import option from the Salesforce inspector.

 

Please ensure that the “Use Tooling API” checkbox is checked and the Action is set to “Delete.” Choose the Object as “Flow” and maintain the format as Excel. Then, paste the Excel data and map the ID field. You can leave the remaining mappings for now.

 

So, all the flow versions can be easily deleted with a single click using Salesforce Inspector. You can log in and verify that all the flow versions have been deleted.

Read more: Salesforce Inspector Reloaded

Mass Deletion Using External Tools:

Utilize XL-Connector to mass-deactivate and delete flows. Using the Manage Flows and Processes option, download all the flows. Then, deactivate flows or select the flows with Draft or Obsolete status.ย 

 

Next, delete the rows with flows to remove from the spreadsheet and clickย “Update All.”

 

FAQs

1. What permissions do we need to delete a flow?

You need the “Manage Flows” permission or equivalent system administrator privileges to delete flows in Salesforce.

To grant this permission, go to Setup and enter “Profiles” in the Quick Find box. Select the profile that needs flow access and click “Edit”. In the “General User Permissions” section, check “Manage Flows” and “Run Flows.” Click “Save” to apply the changes.

These steps ensure the user profile has the necessary permissions to manage flows in Salesforce.

2. Can we retrieve deleted flows in Salesforce?

Unfortunately, no. Once a flow is deleted, it’s permanently removed from your Salesforce organization.

3. What happens when we delete a flow?

All versions of the flow are permanently deleted. Associated triggers, processes, or fields will remain unaffected.

4. Will deleting a flow affect Salesforce org’s performance?

Deleting unused or redundant flows can improve performance by reducing the processing load on your org.

5. Can we delete a flow if it’s part of a managed package?

If the flow is part of a managed package, you might not be able to delete it directly. You may need to uninstall the package or contact the package provider.

Conclusion:

Keeping your Salesforce flows organized is key! This guide showed you a few ways to delete old flows you don’t need anymore. Whether you prefer clicking buttons on the Salesforce website (UI) or using tools like Salesforce Inspector for bigger jobs, a method works for you.

Just remember to be careful when deleting โ€“ make sure you have a backup or know how it might affect what you’re doing in Salesforce.

Get a complete Roadmap To Learn Salesforce Admin And Development

Share Now

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *