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
_dj_dj 

Mass delete several object types with few API calls

We would like to delete following objects:
Account
Contact
Event
Tasks
Attachment

with as few API calls as possible.

What is the best way without querying and deleting a ID at a time?

Thanks
Hitesh
DevAngelDevAngel

Hi _dj,

You will need 10 calls.  Five calls to obtain the ids from salesforce.com.  Five calls to delete the records from the five objects.

I'd do this operation in the reverse order that you have the objects list though to prevent any referential integritry issues.

_dj_dj
We have been using production as development area because of lack of cloning a saleforce organization. Now that the testing has completed, we would like to delete all data and restart our upload.

Any backdoor option? Can professional services execute this request on our behalf?

Thanks
Hitesh
benjasikbenjasik
Contact support. There's a feature to delete all the data out of your organization when you are in trial mode. They may be able to use that feature for your system.