Transactions in Dynamics CRM

2007_microsoft_dynamics_crmToday I would like talk about transactions. In the CRM 4 the plugins cannot have an automatically rollback actions when exception occurs. In CRM 2011 you can register plugins in new stage. That means that you can register your plugin in a transaction (stage 20 and 40). When plugin throws an exception, every action done during the transaction will be rollback. The next table contains the details for every events. If you want other information, you can read these articles: http://msdn.microsoft.com/en-us/library/gg327941.aspx or http://msdn.microsoft.com/en-us/library/hh237515%28v=crm.6%29.aspx#bkmk_RegStep

 

 

Event Stage Name Stage Code Description
Pre-Event Pre-validation 10 Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage may execute outside the database transaction.
Pre-Event Pre-operation 20 Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage are executed within the database transaction.
Post-Event Post-operation 40 Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage are executed within the database transaction.
Post-Event Post-operation 50 Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage may execute outside the database transaction. This stage only supports Microsoft Dynamics CRM 4.0 based plug-ins.

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...