Question Status

Verified
Jags101 asked a question on 20 Feb 2015 1:18 AM

What are Asynchronous plugins and what are its benefits? How are they different from Synchronous plugins?

Reply
Suggested Answer
Bruno Lucas responded on 20 Feb 2015 1:40 AM

for long tasks. it will register on the post event only. I've seen people adding long queries or nested loops on a synchronous plugin and start to experiment slow speed and failures.

the only problem is that the user doesn't know when it complete. but you can create a task or create an email to notify the user.

Register plug-ins for asynchronous events when they have to perform lots of processing or for functions that are not time critical. Registering a plug-in that performs lots of processing for a synchronous event can adversely affect the performance of Microsoft Dynamics CRM.

msdn.microsoft.com/.../gg334554.aspx

Bruno Lucas, Senior CRM Consultant

DynamicDay CRM Blog 

Please mark my post as "Verified" If it helped to solve your problem 

Reply
bhuvaneswary rajasekaran responded on 20 Feb 2015 5:22 AM

synchronous plugins executes on time i.e. your transaction will be blocked until your plugin code is executed. where asynchronous plugins runs as a background process independently without affecting your current  transaction.

Reply
Verified Answer
Mahadeo Matre responded on 20 Feb 2015 9:30 AM

Synchronous Plugins are like a Triggers on database table.. when you are performing any operation on that entity, synchronous plugins are executed in that pipeline.

E.g when account is created, you want to create accountnumber at that time.. for this purpose you use synchronous plugin, because this operation need to done as soon as account is created or when account is creating.

Main thing need to consider for Synchronous plugin is that, those plugins need to be executing very fast.. other wise user need to wait until plugin operation is completed.

Also If any error throwing from this plugin, user will know right a way.

You can register Synchronous plugin on Pre Stage also

Asynchronous plugin are uses CRM Asynchronous service to execute, and these plugins will allow to event to be completed.

You can register Asynchronous plugins only on Post Stage.

Hope this will help..

Reply
Verified Answer
Mahadeo Matre responded on 20 Feb 2015 9:30 AM

Synchronous Plugins are like a Triggers on database table.. when you are performing any operation on that entity, synchronous plugins are executed in that pipeline.

E.g when account is created, you want to create accountnumber at that time.. for this purpose you use synchronous plugin, because this operation need to done as soon as account is created or when account is creating.

Main thing need to consider for Synchronous plugin is that, those plugins need to be executing very fast.. other wise user need to wait until plugin operation is completed.

Also If any error throwing from this plugin, user will know right a way.

You can register Synchronous plugin on Pre Stage also

Asynchronous plugin are uses CRM Asynchronous service to execute, and these plugins will allow to event to be completed.

You can register Asynchronous plugins only on Post Stage.

Hope this will help..

Reply
Suggested Answer
Bruno Lucas responded on 20 Feb 2015 1:40 AM

for long tasks. it will register on the post event only. I've seen people adding long queries or nested loops on a synchronous plugin and start to experiment slow speed and failures.

the only problem is that the user doesn't know when it complete. but you can create a task or create an email to notify the user.

Register plug-ins for asynchronous events when they have to perform lots of processing or for functions that are not time critical. Registering a plug-in that performs lots of processing for a synchronous event can adversely affect the performance of Microsoft Dynamics CRM.

msdn.microsoft.com/.../gg334554.aspx

Bruno Lucas, Senior CRM Consultant

DynamicDay CRM Blog 

Please mark my post as "Verified" If it helped to solve your problem 

Reply