A PostOperation plug-in on the order table creates one shipment line per order line. A developer proposes wrapping the line creations in an ExecuteMultipleRequest to reduce overhead, as they do in their nightly console import. What is the recommended guidance for this plug-in?
Select an answer to reveal the explanation.
Short Explanation
Inside a plug-in you're already in the express lane: the requests skip the public endpoint and ride the same transaction. Bolting ExecuteMultiple on top just adds weight. The trap is copying a pattern from your console app into a place where it doesn't belong.
Full Explanation
Microsoft's plug-in guidance says not to use batch request types such as ExecuteMultipleRequest or ExecuteTransactionRequest inside plug-ins and custom workflow activities. Requests sent from a synchronous plug-in already execute within the pipeline's database transaction and do not traverse the public API endpoints, so batching gives no network benefit and can make the plug-in run longer, increasing the risk of hitting the execution time limit and holding locks. Creating the shipment lines with individual Create calls keeps the logic simple and lets any failure roll back the whole operation consistently. Setting ContinueOnError on a batch would let some lines fail silently while the order commits, which leaves inconsistent data, and it is still a batch message the guidance discourages. Switching the step to asynchronous mode does not change the recommendation; batch messages are discouraged in asynchronous plug-ins as well, and the time limit applies there too. ExecuteTransactionRequest does not create an independent transaction inside a plug-in; operations in the pipeline participate in the existing transaction, and it is another batch type the guidance excludes. Exam caveat: batching and bulk messages remain valuable in external client applications such as data imports. Operational check: run the solution checker on the assembly and confirm no batch-request rule violations are reported.