Deleting records via Salesforce Flow – Getting to Know Data Management

In the Salesforce world, there are or have been many automations that can create or update records, but not many that can delete them. Besides coding, there is a low-code solution that can be used to delete records. Moreover, it can be used to delete both single and multiple records. Ladies and gentlemen, let’s once again welcome Salesforce Flow. Salesforce Flow is a powerful tool that, in addition to creating and editing records, offers the option to delete them. When creating custom Flow automation, you can use the Delete action to perform record deletion. This action can be triggered after the creation, updating, or even deletion of other records. What’s more, you can choose to run Flow in system mode. For example, even if the user who triggered the Flow automation doesn’t have permission to delete some records, they will be deleted as the system mode will bypass this restriction. Powerful? Yes, it is! Will you use it? Yes, you will!

Restoring the data

Sometimes life can be tough, requiring you to save an entire company, some specific co-workers, or at least one person, but most importantly, yourself. This can happen when someone (was it you?) “accidentally” deletes some data from Salesforce. Besides answering the question of how this happened, the first thing you would need to do is save the day and restore this data. Thankfully, this is not hard to do, as Salesforce provides us with a Recycle Bin feature. It’s accessible as a tab and is really easy to use.

To find proper data, you can use two predefined List Views:

  • My Recycle Bin
  • Org Recycle Bin

Figure 3.13: Recycle bin in Salesforce

To restore the data, just mark the specific record and restore it, or mark a few records and do this as a mass action. As simple as that. What is important is that currently, there is no “restore all” option in Recycle Bin, so for this reason, Salesforce recommends using the Workbench tool to perform this action.

Now you know how to restore deleted data. You can now say “I’m the king of my trash can!” as Oscar the Grouch from Sesame Street said.

Tips

Restoring data is quite easy but you need to remember that the deleted data will not be in the Recycle Bin for long. After deletion, the record “sits” in the Recycle Bin for 15 days. After this time, the records will be purged from the Recycle Bin and can’t be recovered.

You’ve just gained valuable knowledge about deleting and recovering records in Salesforce. What I can whimsically wish for you is that in your Salesforce journey, you won’t have to recover records unintentionally deleted by users. However, if you ever need to, you already know where to find them. Although, remember that regardless, it’s worth considering how to regularly back up your data in Salesforce. We won’t delve into this topic in this book, but there are plenty of options to do so. I encourage you to explore this topic on your own.

To conclude the topic of imports, exports, data deletion, and recovery, I invite you to another topic in this book. In the next section, we will discuss the interesting subject of Salesforce record types.

Leave a Reply

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