You need to sign in to do that
Don't have an account?
Leticia Monteiro Freitas
How is the most efficiente way to clean up a org?
I want clean all the data in my org. How is the easiest way to do this?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
delete [ select id from Account limit 10000 ];
delete [ select id from myObject1__c limit 10000]:
...
delete [ select id from myObject20__c limit 10000]:
because of the limit of 10000 records, you just relaunch the all list of delete orders until all your objects are empty.
That is the most easy way but if you have hundreds of thousands records you need to use another technique.
All Answers
What do you mean by "cleaning" the data?
I want erase all the data in my org. How Can i do that?
delete [ select id from Account limit 10000 ];
delete [ select id from myObject1__c limit 10000]:
...
delete [ select id from myObject20__c limit 10000]:
because of the limit of 10000 records, you just relaunch the all list of delete orders until all your objects are empty.
That is the most easy way but if you have hundreds of thousands records you need to use another technique.
View your Salesforce org’s storage limits and usage from the Storage Usage page in Setup.
https://help.salesforce.com/articleView?id=admin_monitorresources.htm&type=5
What is the biggest object in records?
You have also the "Mass Delete Records" for some standard object from the "Setup".
1) From the (setup) "Object manager" (lightning): copy/paste all the object list in Excel
2) Copy paste all the list of object from (setup) "Storage Usage" to know the not empty object
3) generate the list of deletion orders from Excel: ="delete [ select id from " & A1 & " limit 10000 ];"
4) Developer console and CTRL + E (anonymous window): paste all the deletion orders