Newer Version Available
Delete Multiple Records with Fewer Round-Trips
Use a DELETE request with sObject Collections to delete up to 200 records, returning a
list of DeleteResult objects. You can choose to roll back the entire request when an error
occurs.
Request Syntax
DELETE /vXX.X/composite/sobjects?ids=recordId,recordId
Parameters
| Parameter | Description |
|---|---|
| allOrNone | Optional. Indicates whether to roll back the entire request when the deletion of any object fails (true) or to continue with the independent deletion of other objects in the request. The default is false. |
| ids | Required. A list of up to 200 IDs of objects to be deleted. The IDs can belong to different object types, including custom objects. |
Usage Guidelines
- The DeleteResult objects are returned in the order in which the IDs of the deleted objects were specified.
- You can't delete records for multiple object types in one call when one of those types is related to a feature in the Salesforce Setup area.
Request Example
1DELETE /composite/sobjects?ids=001xx000003DGb2AAG,003xx000004TmiQAAS&allOrNone=falseResponse Body Example
1[
2 {
3 "id": "001xx000003DGb2AAG",
4 "success": true,
5 "errors": []
6 },
7 {
8 "id": "003xx000004TmiQAAS",
9 "success": true,
10 "errors": []
11 }
12]