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
BlobBlob 

DeleteResult does not contain any id when there is an error

If the DeleteResult isSuccess() returns false the getId() is null.

If the DeleteResult isSuccess() returns true the getId() contains the id that was removed.

Why can't the DeleteResult contain the id that failed to be deleted?
If I submitted several ids to be deleted and several had problems it would be nice to know which id that had what problem.

This is found using 7.0 API with StatusCode._INVALID_CROSS_REFERENCE_KEY error.
SuperfellSuperfell
like all the batch calls (create, update, upsert, delete, describeSObjects), the results are in the same order as the request, i.e. if the 42nd deleteResult in the response array says it failed, its from the 42nd id in the request.
BlobBlob
Thanks!

That helped.