“Need to start a transaction before commit” Fault Exception in crm 2011

Hi we were getting this error on our plugin on post update of an entity.

The plugin was using Associate message to associate one entity record to other.

If the records were already associated, it was throwing “duplicate key” error, so we were catching that fault exception and then were updating few other records in our plugin. However just after the execution of our plugin, we were getting the CRM’s Error dialog box having a error log file mentioning the above error.

Later we realized that once a Fault Exception is thrown then the execution of the plugin is no longer in transaction. We can’t catch the faualt exception and still be in transaction. This post clarified that.

http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/ca1301ca-cef9-4940-9cb4-e968641199f6

Hope it helps !


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

10 thoughts on ““Need to start a transaction before commit” Fault Exception in crm 2011”

  1. Hello there, simply become alert to your blog thru Google, and located that it’s really informative. I’m gonna be careful for brussels. I will be grateful in case you proceed this in future. Numerous people will be benefited out of your writing. Cheers!

    Like

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s