[SalesForce] How to permanently delete a record whose isdeleted=”true”

I tried several ways:

  1. delete it from the UI
    After I click "Empty you recycle bin" button, nothing in the recycle bin.

  2. use database.emptyRecycleBin()
    Even though there is nothing in the recycle bin, I am able to query it back using "all rows".

  3. use workbench

It first gives me a warning "It does not seem like this record can be deleted. Are you sure you wish to continue?"

Then I hit confirm delete it gives me
Result: "Entity Is Deleted"
Status: "ENTITY_IS_DELETED"

Best Answer

The system doesn't immediately purge deleted records once you empty the Recycle Bin. Instead, they're flagged for purging, which runs periodically in the background. Your record will be gone after the next sweep. I do not remember the exact time frame for this process, but it's definitely within 24 hours going to happen at some point. See this knowledge article for details:

Record data has 3 stages of deletion:

Stage 1 - Deleted to Recycle Bin - Data in this stage can still be recovered from the recycle bin. This can also be referred to as soft deleted.

Stage 2 - Emptied from the Recycle Bin or hard deleted - Data in this stage cannot be recovered from the recycle bin but can be accessed and exported from the API using Export All (queryall) in DataLoader v21 and higher or other api tools. Records can also be put in this state directly by using the hard delete option in the Data Loader.

Stage 3 - Physically/Permanently deleted - Data in this stage has been wiped from database and only recoverable by contacting Salesforce to request a Data Recovery Service (fee associated). Please click here to learn more about the Data Recovery Process.

Related Topic