function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Roshni GaganRoshni Gagan 

How can I delete records in recycle bin without using Database.emptyRecycleBin()

Best Answer chosen by Roshni Gagan
Raj VakatiRaj Vakati
these are differnet ways
  1. Database.emptyRecycleBin()
  2. DataLoaders ( Even data loader will call Database.emptyRecycleBin() behinf scree)
  3. Rest API .Use /services/data/v20.0/sobjects/ URI 
  4. Using SOAP API ( Enterprices WSDL or Partner WSDL ) same like dataloader 

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi,

Note: Once records have been purged from the Recycle Bin, there is no way to restore them. The only way to recover the records will be to recreate them .

You can delete with dataloader refer below link.

https://help.salesforce.com/articleView?id=000206726&type=1
 
https://help.salesforce.com/articleView?id=inserting_updating_or_deleting_data.htm&type=5
 
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.

Best Regards,
​Sandhya
 


 
Raj VakatiRaj Vakati
these are differnet ways
  1. Database.emptyRecycleBin()
  2. DataLoaders ( Even data loader will call Database.emptyRecycleBin() behinf scree)
  3. Rest API .Use /services/data/v20.0/sobjects/ URI 
  4. Using SOAP API ( Enterprices WSDL or Partner WSDL ) same like dataloader 
This was selected as the best answer