Loading

Delete Unwanted Data in a Salesforce Organization

Veröffentlichungsdatum: Jun 20, 2024
Beschreibung
Users sometimes notice unwanted data in their Salesforce Org. This could be confidential, duplicate or just junk data. This article talks about how you can delete the data and completely purge it from the org.

 
Lösung

There are two steps in this process - deleting the data and purging the data completely from the org. Let's discuss the two steps in detail.


1. Deleting the data, also known as Soft Delete

There are a few ways of deleting the unwanted data. Depending on the number of records involved, you can either delete them through the Salesforce user interface (UI) or the SOAP API.

If there are only a few records, it is simple to delete them through the UI. Through the UI, you can either click the "Delete" button on each record individually or use the Mass Delete tool. Please ensure that you have the appropriate delete permission for those records. For more on the Mass Delete tool, please review Delete Multiple Records and Reports

If you have a larger number of records to delete, you can use the Apex Data Loader (API). You would need to create a CSV file containing all the record IDs and use the delete/hard delete operation of Data Loader. For more, please review Insert, Update, or Delete Data Using Data Loader.
 
Deleted records remain in the Recycle Bin for 15 days, and can be restored during that time. Until the soft deleted data is completely removed from the system, the Users with 'Modify All Data' and 'API access' can check for records in this state by using 'Export All' in Data Loader, and filtering on 'isDeleted = True.'

2. Purging the data completely from the org
 
  1. Purging the Soft delete data from the Recycle Bin - To permanently remove your deleted items before the 15-day period, administrators and users with the “Modify All Data” permission can click Empty your Recycle Bin or Empty your organization’s Recycle Bin. If not intervened, after 15 days, deleted items are purged from the Recycle Bin, and once purged, they can’t be recovered. Records cleared from the Recycle bin are marked for permanent deletion by the salesforce automated process.


  2. Hard Delete through API - System Admins in the orgs can perform Hard Delete of records through Data loader, which directly marks the records as Deleted and sends them to the purge queue to remove the records permanently from the system. Please review Activation of Bulk API Hard Delete on System Administrator Profile.
 
Note: If you want to remove the record completely, you have to empty the Recycle Bin and request that Salesforce support perform a Physical delete.  For more, please review View and Purge the Recycle Bin. If records are directly Hard Deleted, then you will not see them in the recycle bin. If records are still in the recycle bin, administrators and users with the “Modify All Data” permission can click Empty your Recycle Bin or Empty your organization’s Recycle Bin.

The last step is to request Physical Delete. Physical Delete (PD) refers to a sweeper process in the Salesforce database that removes a record from the corresponding database table. Physical Delete is sometimes referred to as a “Permanent” delete. To request Physical Delete to be run against your org, please Create a Support Case with the following details:

• Target/Affected Organization ID.
• Name of the target object and API reference name (If there is no specific object, please let us know. In that case, physical deletion will be executed for all objects).
• Username of the system administrator of the organization requesting the physical deletion (please provide in email address format including @).
• Details as to why you are requesting a physical delete.
 
Note: Once this process has removed a record, the record can no longer be accessed through the UI or the API.
 
For information specifically addressing the deletion of custom fields, please follow these steps to Purge Deleted Custom Fields.

Nummer des Knowledge-Artikels

000387294

 
Laden
Salesforce Help | Article