Apr 16, 2014

Mass Delete Salesforce Records


Sometimes you may want to delete test data from Sandbox environment. Here is a simple way to conditionally mass delete records from both Standard or Custom objects.

Please exercise extreme caution if you want to run in production environment !   

Open Developer Console

Go to Debug  --> Open Execute Anonymous Window (Ctrl + E saves time)

Enter your delete command in below format -

DELETE [Select ID from <object> where <your where condition> limit <any limit>];

eg. DELETE [Select ID from Task where ownerid = '005i0000002sbzK'];

Click Execute.

Mass delete Salesforce Records

No comments:

Post a Comment