locked
When to use Plug-ins RRS feed

  • Question

  • Hello All, Can any one please tell me that When to use Plug-ins?
    Thursday, June 9, 2011 12:39 AM

Answers

  • Check this Microsoft Article.

    As a developer interested in extending or customizing Microsoft Dynamics CRM, you have several methods of accomplishing your task. The relevant technologies provided by the SDK that you can make use of include adding client side JavaScript code to forms, writing plug-ins, writing workflows, or adding custom ASP.NET pages. The technology you choose is dependent on the task that you need to perform. Because this article is about plug-ins, I will focus on that technology. However, I will briefly discuss workflows because there is some overlap in functionality between what you can accomplish in plug-ins and workflows.

    Below is a table that summarizes some of the characteristics of plug-ins and workflows.

    Criteria Plug-in Workflow

    Executes before or after the core platform operation (Create, Update, Delete, etc.)

    Executes immediately before or after the core operation (synchronous). Can also be queued to execute after the core operation (asynchronous).

    Is queued to execute after the core operation (asynchronous).

    Performance impact on the Microsoft Dynamics CRM platform

    Synchronous plug-ins can increase the platform’s response time as they are part of the main platform processing. A poorly designed plug-in could hang the platform.

    Less of a negative impact on platform response time.

    Security restrictions

    To register a plug-in with the platform requires a System Admin or System Customizer security role and membership in the Deployment Administrator group.

    Users can interactively create worksflows in the Web application. However, in order to register custom workflow activities, the deploying user must have the same security roles as required for registering plug-ins.

    Microsoft Dynamics CRM version (SKU) support

    Not supported in Microsoft Dynamics CRM Online. May be supported in partner hosted installations.

    Workflows without custom activities are supported by all product versions. Workflows with custom activities are supported the same as plug-ins.

    Best application is for tasks which require a short or long amount of computing time

    A plug-in registered for synchronous execution is best used for short processing tasks while a plug-in registered asynchronously can be used for process intensive operations. However, an asynchronous plug-in can only execute after the core platform operation has completed.

    Either short or long processing tasks

    Can be executed while the Outlook client is online or offline

    Both online and offline are supported

    Workflows do not execute on the offline Outlook client host computer.

    Process and data persistence

    Plug-ins execute to completion.

    Workflows can be paused, postponed, cancelled, and resumed through SDK calls or by the user through the Web application. The state of the workflow is automatically saved before it is paused or postponed.

     

    There are scenarios in which you must use a (synchronous) plug-in. For example, if you need to execute custom code immediately before or after the core platform operation executes and before the result of the operation is returned from the platform. Because workflows and asynchronous plug-ins are queued to execute some time after the core operation executes to completion, you are not guaranteed when they will run. On the other hand if you want to add custom functionality to Microsoft Dynamics CRM Online, only a workflow without custom activities is supported.

    As you can see, there is an overlap in functionality between what kinds of operations a plug-in and a workflow can perform. As a developer, you will have to evaluate both technologies and decide on the one that best suits your business objectives after taking into account deployment, performance, and maintenance concerns of your plug-in or workflow solution.


    Thanks, - Israel Pradeep, - Software Engineer & PMP & B.I - Entrepreneur, - "If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"".
    • Proposed as answer by Israel Gujjarlapudi Thursday, June 9, 2011 12:41 AM
    • Marked as answer by KumarXRM Thursday, June 9, 2011 12:41 AM
    Thursday, June 9, 2011 12:41 AM

All replies

  • Check this Microsoft Article.

    As a developer interested in extending or customizing Microsoft Dynamics CRM, you have several methods of accomplishing your task. The relevant technologies provided by the SDK that you can make use of include adding client side JavaScript code to forms, writing plug-ins, writing workflows, or adding custom ASP.NET pages. The technology you choose is dependent on the task that you need to perform. Because this article is about plug-ins, I will focus on that technology. However, I will briefly discuss workflows because there is some overlap in functionality between what you can accomplish in plug-ins and workflows.

    Below is a table that summarizes some of the characteristics of plug-ins and workflows.

    Criteria Plug-in Workflow

    Executes before or after the core platform operation (Create, Update, Delete, etc.)

    Executes immediately before or after the core operation (synchronous). Can also be queued to execute after the core operation (asynchronous).

    Is queued to execute after the core operation (asynchronous).

    Performance impact on the Microsoft Dynamics CRM platform

    Synchronous plug-ins can increase the platform’s response time as they are part of the main platform processing. A poorly designed plug-in could hang the platform.

    Less of a negative impact on platform response time.

    Security restrictions

    To register a plug-in with the platform requires a System Admin or System Customizer security role and membership in the Deployment Administrator group.

    Users can interactively create worksflows in the Web application. However, in order to register custom workflow activities, the deploying user must have the same security roles as required for registering plug-ins.

    Microsoft Dynamics CRM version (SKU) support

    Not supported in Microsoft Dynamics CRM Online. May be supported in partner hosted installations.

    Workflows without custom activities are supported by all product versions. Workflows with custom activities are supported the same as plug-ins.

    Best application is for tasks which require a short or long amount of computing time

    A plug-in registered for synchronous execution is best used for short processing tasks while a plug-in registered asynchronously can be used for process intensive operations. However, an asynchronous plug-in can only execute after the core platform operation has completed.

    Either short or long processing tasks

    Can be executed while the Outlook client is online or offline

    Both online and offline are supported

    Workflows do not execute on the offline Outlook client host computer.

    Process and data persistence

    Plug-ins execute to completion.

    Workflows can be paused, postponed, cancelled, and resumed through SDK calls or by the user through the Web application. The state of the workflow is automatically saved before it is paused or postponed.

     

    There are scenarios in which you must use a (synchronous) plug-in. For example, if you need to execute custom code immediately before or after the core platform operation executes and before the result of the operation is returned from the platform. Because workflows and asynchronous plug-ins are queued to execute some time after the core operation executes to completion, you are not guaranteed when they will run. On the other hand if you want to add custom functionality to Microsoft Dynamics CRM Online, only a workflow without custom activities is supported.

    As you can see, there is an overlap in functionality between what kinds of operations a plug-in and a workflow can perform. As a developer, you will have to evaluate both technologies and decide on the one that best suits your business objectives after taking into account deployment, performance, and maintenance concerns of your plug-in or workflow solution.


    Thanks, - Israel Pradeep, - Software Engineer & PMP & B.I - Entrepreneur, - "If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"".
    • Proposed as answer by Israel Gujjarlapudi Thursday, June 9, 2011 12:41 AM
    • Marked as answer by KumarXRM Thursday, June 9, 2011 12:41 AM
    Thursday, June 9, 2011 12:41 AM
  • Hi Kumar, by your past couple of questions I recommend that you read through the CRM SDK on the plugin topic, so will get much better informed, see http://msdn.microsoft.com/en-us/library/gg334724.aspx

    Gonzalo | gonzaloruizcrm.blogspot.com

    Thursday, June 9, 2011 12:42 AM
    Moderator