There are times when you may need to delete records in mass. Maybe an import was done or a mass update and you want to remove any records created. This is also helpful during migrations.
The record types you can mass-delete include cases, solutions, accounts, contacts, leads, products, and activities.
Here are some ways that mass delete is handy.
- You’ve identified multiple reports that are no longer used and you want to unclutter the list of reports on the Reports tab.
- You imported your leads incorrectly and you want to start over.
- You want to clean up web-generated leads that were created incorrectly or delete accounts and contacts with which you no longer do business.
To Mass Delete Records:
Make sure you have a backup of your data or do a quick export before performing the mass delete.
Run a SOQL query in Developer Console or a Report to view the records you will be deleting and get a record count.
- From Setup, enter Mass Delete Records in the Quick Find box, and then select Mass Delete Records.
- Click on the link for the type of record to delete. For this example we will use Activities.
- In Step 3 of the Mass Delete screen, add the criteria for the records to remove. For example: Activities created today, Accounts in Texas, Open cases older than 2 years. The below image shows we are deleting activities that were created by ‘bgear’ AND created Today AND is a Task.
- To find records that match the filter, click the Search The result list will display at the bottom of the page.
- Review the items to be sure you recognize them and that the filter is correct. If there are more than 250 records, you will be alerted that there are more records in the results.
- Check the box next to the items you want to delete. To select all currently displayed items, check the box in the Column Header.
- To permanently delete records, select Permanently delete the selected records.
** SELECTING THIS OPTION PREVENTS YOU FROM RECOVERING THE SELECTED RECORDS FROM THE RECYCLE BIN.
- Click the Delete button. If you did not select Permanently delete the selected records, deleted items are moved to the Recycle Bin.
- If you have deleted all of the records in the list, it will be blank. If you have more records to delete, repeat steps 7 – 10 until all records are removed.