views:

548

answers:

3

One would assume with any web-based data application that database transactions would be an integral part of the design. Looking around at CrmService, I can't find anything that suggests that transactional 'CRUD's are available. Is it the case that this is not supported/implemented in MSCRM? If it is, and i have missed it, could someone please point me in the right direction. I fear coding a whole lot of 'repair code' to cater for errors/exceptions half way through a custom import/registration routine that I have coded.

-Luke Baulch

A: 

No, there is no database-like transaction support in CRM. About the closest thing would be registering a plugin/callout that runs PreCreate of a record... if something in there fails, the record itself will not be created, but there could still be steps that did succeed before one that failed.

Matt
Thanks. Although I think its a shame that this fair standard feature wasn't incorperated into microsofts CRM implementation.
Luke Baulch
+1  A: 

Well, Dynamics CRM 4.0 does not include transaction support.

But, fortunately, the 5.0 version will ... see: http://blogs.msdn.com/ukcrm/archive/2008/11/10/what-s-new-in-crm5.aspx

Ciprian Bortos
5.0 will not have transaction support except within the context of a plugin.
SaaS Developer
You are right.On the other hand, some will debate that a transaction over multiple web-service calls is not in the SOA spirit (I really received this answer from a MS evanghelist) because the web-service calls are supposed to be atomic ... but in practice, I prefer having this kind of transaction support, as opposed to custom compensation logic. So far, with ASMX web-services, I user COM+ transactions and the MSDTC mechanism.
Ciprian Bortos
A: 

Hi Luke,

I have also inquired regarding this issue at the Dynamics CRM Forum

Unfortunately there is no transaction support for the current Dynamics CRM Web Services. This is quite dangerous, since our custom solution invoking several web services call to implement one holistic unit of work, and if one of the web service call encountered error during the execution, it will create data integrity issue

Regards

hadi teo

hadi teo