Loading

Restore multiple records that are in recycle bin

Date de publication: Oct 13, 2022
Description

It may be necessary to mass restore a large number of records that were incorrectly moved to the recycle bin.

Since there is no 'restore all' button in recycle bin it may not be scalable to manually undelete all records from the recycle bin.
 

Résolution


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.


 

See Also:
Unable to restore a deleted record from the Recycle Bin

Considerations for Restoring Records from the Recycle Bin

Numéro d’article de la base de connaissances

000384757

 
Chargement
Salesforce Help | Article