When attempting to use REST API to delete multiple object records like so:
h t t p s://org.my.salesforce.com/services/data/v42.0/composite/sobjects?ids=0010x000000000,a1r0x000000001,a1m0x000000002,a1w0x000000003,a1r0x000000004,a1w0x000000005,a1m0x000000006&allOrNone=true
I'm getting errors that look like this:
"message": "Your attempt to delete Test Loan kvNrH could not be
completed because it is associated with the following
opportunity history.: OH-00549884\n",
However, the OH-00549884 that the error is complaining about is also in the list of IDs to delete in the URL.
I found that if I have the allOrNone set to false I can run it twice and everything is deleted (however, not a very elegant solution). So I'm trying to do this all in one go. Has anyone had to overcome this issue, or have an approach for overcoming this?