Loading

Restore Multiple Records from the Salesforce Recycle Bin Using Workbench or Data Loader

Julkaisupäivä: Jun 4, 2026
Kuvaus

This article explains how to mass restore (undelete) a large number of records from the Salesforce Recycle Bin. When records are accidentally deleted in Salesforce, they are moved to the Recycle Bin and retained for 15 days. While you can manually restore records one by one from the Recycle Bin UI, there is no 'Restore All' button for bulk restoration.

For Salesforce editions with API access, you can use Workbench or Data Loader's Export All feature to identify deleted records and perform a bulk Undelete operation

Ratkaisu

To bulk restore records, you will use Workbench to query deleted records (IsDeleted = TRUE) and then perform an Undelete operation using a CSV of the record IDs.

Alternatively, use Data Loader's Export All feature to generate the CSV.

Salesforce editions with API Access may be able to bulk restore records via an Undelete() API call using client tools such as Workbench.
 

Note
Salesforce does not provide support for Workbench or Excel features or functionality and can't perform data management or manipulation tasks on a customer's behalf. The following information is provided as a courtesy and to serve as general guidelines for customers. See Workbench Support for questions and assistance with Workbench.

 


1. Login to Workbench using your Salesforce credentials and select the queries drop-down | SOQL Query.

Select the object that contains the records to be restored. Select Include under List and for Deleted and archived records. And select View as CSV.

Alternatively, you may use the Data Loader's Export All feature to generate the .csv of deleted records to be restored instead of using Workbench as outlined in steps 2-5. See Export Data for more details.


2. Select the Id and any other fields that may be necessary to identify the records you'd like to restore. Filter results by: IsDeleted = TRUE.


Note: You can add any additional filters of your choice by clicking the green (+) button.


3. Select the Query button and you should see a list of matching results generated on the page.

4. Workbench will provide a CSV download of the returned records.

5. Review the data provided in the .csv file to validate the records to be undeleted. Remove any rows if they do not need to be recovered, and save the file as CSV (Comma Delimited).

6. Return to Workbench, click the data drop-down menu, and choose Undelete. Undelete.  


Select From File | Browse... and select the CSV file you just saved. The file should contain all of the Ids for the records you'd like to restore | Next.  Map the Id field to the ID column in your CSV and select the Map Fields button and lastly the Confirm Undelete button.


A response will display to indicate if the recovery was successful or if any records returned an error message.



Knowledge-artikkelin numero

000384757

 
Ladataan
Salesforce Help | Article