3

I am developing a new software (a desktop-application), where I access MS CRM 2013 through the CRM-WebService.

As there are a lot of tasks, where some operations may fail, I would like to use transactions within the webservice-access to prevent data integrity issues.

As read here: Does MSCRM web-service support database transactions?, it wasn't supported in CRM 4.0. And I don't know if it was already implemented in CRM 2011?

Could you please help me, whether the new crm-webservice-implementation supports transactional CRUDs.

Community
  • 1
  • 1
abc
  • 2,285
  • 5
  • 29
  • 64

1 Answers1

3

It does. In a fashion. Probably not in the manner in which you are expecting.

When writing plugins, the data changes in the execution pipeline are contained in a transaction and are rolled back on error.

When writing other SDK code, you can write it in a manner which is pseudo transactional. You can collate your operations into a single ExecuteMultipleRequest operation with optional ContinueOnError.

John Rogerson
  • 553
  • 4
  • 12
  • 2
    Just done some more reading on this. `ExecuteMultipleRequest` isn't transaction aware but you could possibly get clever with it putting the related operations into one request and cleaning up on fail. This blog article explains its mechanism quite well... http://blogs.msdn.com/b/thecrmguys/archive/2013/01/09/hands-on-with-dynamics-crm-2011-s-new-executemultiple-request.aspx – John Rogerson Jan 29 '14 at 11:21
  • John, It's indeed an interesting article to boost your performance but it doesn't allow you to implement 'transaction logic'. I was wondering what you meant saying "..cleaning up on fail..". What if some create requests went through and you are not allowed to delete CRM records? How are you going to roll back updates? – Bram Van Strydonck Feb 11 '15 at 10:07