+ Start a Discussion
Roushan kumarRoushan kumar 

Deleting files

How can we delete data permanently, withoput sending to recyle bin?
logontokartiklogontokartik
I am not sure if there is a way from Apex, but you can always clear out recyclebin by using
Database.emptyRecycleBin() method.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database.htm
Shashi PatowaryShashi Patowary
Hi Roushan,

Even if data cannot be deleted permenantly except using Database.emptyRecycleBin() method, you can use data loader to delete records permenantly (Hard delete). Please change the setting of DL to use bulk api.

Please let me know if it helps.

Regards,
Shashi