Transaction aware batch processing using ‘ExecuteMultipleRequest’

Rajeev Pentyala – Dynamics 365 Blog:

In this article, I am going to discuss about transaction aware batch processing in ExecuteMultipleRequest using ExecuteTransactionRequest.

Is ‘ExecuteMultipleRequest’ not a transaction aware?

  • By design, ‘ExecuteMultipleRequest’ is non-transactional.
  • Which means ‘Request’ objects added to ‘ExecuteMultipleRequest’ are independent of each other and if any exception occurred in any of the ‘Request’ will not roll back previously committed ‘Requests’.
  • However you have an option to stop the batch (i.e., By setting ContinueOnError = false), if any exception occurs.
  • Important to note is that, this behavior is not a transaction aware and ‘Requests’ executed prior to the error, will still be committed.

How can we achieve ‘Transaction’ in Batch execution?

  • Using ExecuteTransactionRequest, we can achieve ‘Transaction’ (i.e., Commit and Rollback) in Batch execution
  • ExecuteTransactionRequest will execute the all the ‘Requests’ in a single transaction.
  • If any exception occurred in any of the ‘Request’ execution, will roll back all the previously…

View Original Post

Hope this helps…

Happy CRM’ng.

Cheers,

PMDY

User Impersonation in Plugins, Workflow and Dialogs

Recently I was searching for knowledge base regarding impersonation in Plugins and here were some of my findings.

Impersonation in Plugins

The following grid shows the various user identities present for Plugins. ‘Triggering User’ refers to the logged in user who saves the record in Dynamics CRM and triggers a Plugin to fire. It’s also worth noting that offline plugins will fire once offline as shown and then *again* on the server.

Impersonation in Dialogs and Workflows

The following grid shows the various user identities present for Workflows and Dialogs. The interesting thing here is the difference between Parent and Child Automatic Workflows.

Hope it helps someone!!!

PMDY