3

Is there any way to delete a list of object via single request? I see a possibility to delete only one per request - Delete a Record

1

If you don't limit yourself to REST (and I fully acknowledging that this question is about the REST API), you could create the required SOAP message and use the Partner API delete method that takes a collection of ids to delete.

If you want to make the call from within Salesforce, you could bring the Partner API in by generating the apex classes using WSDL2Apex (Generate from WSDL), or you could construct the required HTTP Request with the correct SOAP body. Let me know if you want assistance with making the call. I have tools for generating the Apex for a single web method if required.

  • I need this call to be made, I believe, from iOS app. I'm not sure. I'm developing backend for a lot of applications. I'll ask guys. Thanks for your help! – Andrii Muzychuk Oct 23 '14 at 7:46
0

After version 34.0, you have a new option which is the batch request that can squash up to 25 subqueries into one request regardless of the operations you'd like to perform.

If you're looking for operating more records in one shot, then to build an Apex Web service is probably your best bet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.