Hard Delete using Apex in Salesforce

Hard Delete using Apex in Salesforce

emptyRecycleBin():

Delete records from the recycle bin immediately.

Pass the record list to emptyRecycleBin() to delete it from Recycle Bin.

Example:

Database.emptyRecycleBin(listRecs);

here listRecs is the list of records to be deleted from Recycle Bin.

Cheers!!!

Leave a Reply