A .NET integration using ServiceClient must create a sales order and its order lines so that either all rows are created or none are, with each request executed in sequence. Which request should the developer use?
Select an answer to reveal the explanation.
Short Explanation
ExecuteMultiple is a bundle of separate deliveries: stop on error just means you stop delivering, not that you take the earlier ones back. ExecuteTransaction is the all-or-nothing deal. And CreateMultiple only handles one table at a time.
Full Explanation
ExecuteTransactionRequest runs the requests in its Requests collection in order within a single database transaction. If any request fails, the entire transaction is rolled back and the response identifies the faulting request, so the sales order and its lines are either all created or none are. ExecuteMultipleRequest also sends a collection of requests in one call, but each request runs independently; setting ContinueOnError to false stops processing at the first failure, yet requests that already succeeded remain committed, leaving an order without all its lines. CreateMultipleRequest is a bulk operation for creating many rows of the same table; the Targets collection must contain entities of a single type, so it cannot create an order and order lines together. Setting ReturnResponses to true on ExecuteMultipleRequest only includes a response for each request in the result; it does not add transactional behavior. Exam caveat: neither batch type should be used inside plug-ins, where operations already participate in the pipeline transaction; the Web API equivalent is a change set inside a $batch request. Operational check: include an order line with an invalid product reference, send the request, and confirm that the operation fails with a fault naming the failed request index and that no order header exists afterward.