emptyRecycleBin() method #inSalesforce

emptyRecycleBin() method #inSalesforce

This is to delete records from the recycle bin immediately.

Syntax: EmptyRecycleBinResult[] = connection.emptyRecycleBin(ID[] ids);

where ids is an array of one or more IDs associated with the records to delete from the Recycle Bin. The maximum number of records is 200.

Note: The Recycle Bin lets you view and restore recently deleted records for 15 days before they are permanently deleted. 


Similarly, try:

Database.emptyRecylebin(List<Id> ids)
Database.emptyRecylebin(sObject sObj)
Database.emptyRecylebin(List<sObject> sObjList)
e.g.
Account acc = new Account(Id='0015g00000mNBXlAAO');
Database.emptyRecycleBin(acc);

Use: DataBase.queryAll() to access the deleted records for a certain time.


Reference: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_emptyrecyclebin.htm

Comments