You need to sign in to do that
Don't have an account?
Ashu sharma 38
how to empty recycle bin by apex
Hello,
How to empty the recycle bin by using apex.
As i am tring to
lead l=new lead(id='00Q7F00000CxIwa');
database.emptyRecycleBin(l);
it works,
but what will do if i want to empty all the records from different objects(As there are from differernt objecs how should i select particular object or should i write SOBJECT???)
How to empty the recycle bin by using apex.
As i am tring to
lead l=new lead(id='00Q7F00000CxIwa');
database.emptyRecycleBin(l);
it works,
but what will do if i want to empty all the records from different objects(As there are from differernt objecs how should i select particular object or should i write SOBJECT???)
Hi nitish,
Yes, you can pass all the list of Sobjects that you want to delete:
Try using the below method:
Hope it helps! Mark it best if you find it helpful.
Thank you,
Ajay Dubedi
Have a look at this code :
Hope this code will help you resolve your query.
If you find it helpful please mark it as best answer so that others can get help from this.
Thanks,
Akshay