How a Plug-in is different from a Call-out? RRS feed

  • Question

  • How a Plug-in is different from a Call-out?
    Monday, August 1, 2011 5:24 AM


  • Hi,

    Call-Out were used in Dynamics CRM 3.0 version and in earlier version from 4.0 onwards Call-out has been replaced by Plugins (which has more functionality, SDK Messages supports and Newer .Net versions support) plugin can also be dpeloyed into the database but call outs can be only deployed into the disk directory <CRM Installation Dir>\Server\Bin\Assembly


    A callout is custom business logic that you can add to modify or augment the standard behavior of the Microsoft CRM system. Another way to think about callouts is that they are extension points made available by the Microsoft CRM system. You can subscribe to a published set of events to have your code run when the event occurs. As part of the subscription, you must specify an event handler. The event handler is a segment of code that runs in response to the system event that is fired. Your event handler must comply with the callout interface. The callout model supports both pre-callouts and post-callouts. Pre-callout code is run before an operation occurs; post-callout code is run after an operation has been completed. There can be any number of pre-callouts or post-callouts associated with a given entity and event. Only supports .NET Framework version 1.1.


    From CRM 4.0 Call-Out has been replaced by Plugins, supports .Net Framework latest versions 4.0 and have more rich functionality and support execution on far more SDK messages then call-outs and can be executed Synchronous and Asynchrnous and Plugin Pre-Operation and Post-Oprtation stage execution involves a database transaction so if the InvalidPluginExecution exception will be thrown then the database Create, Update etc operations will be automatically rolled back.

    You can also reffer MSDN information:

    Comparing Plug-ins to Callouts

    The programming model for adding business logic extensions to Microsoft Dynamics CRM has changed in the latest Microsoft Dynamics CRM 4.0 SDK release as compared to the 3.0 release. This change was the direct result of customers asking for access to more capabilities and run-time information in plug-in code. In addition, architectural changes and feature additions to Microsoft Dynamics CRM 4.0 necessitated changes to the programming model so that plug-ins could take advantage of the new platform capabilities.

    What about your existing callouts? Do you have to throw them away and develop new plug-ins? The good news is that Microsoft Dynamics CRM 4.0 is backwards compatible with the callout programming model. Your existing callouts should continue to work alongside any new plug-ins that you develop as long as you do not use any deprecated features. However, if you want to take advantage of the new Microsoft Dynamics CRM 4.0 capabilities and the rich information that is available at run time, you need to make use of the plug-in programming model.

    The following points highlight what has changed when comparing the new plug-in programming model to the previous callout model.

    • Registration

      Callouts are registered by editing an XML configuration file that is stored in a specific folder on the Microsoft Dynamics CRM 3.0 server. In essence this is a static registration method. Changes to the configuration file require an IIS reset to apply the changes.

      Plug-ins are registered dynamically through a new registration API. No IIS reset is required. Sample tools to register plug-ins, complete with source code, are provided in the SDK.

    • Context

      Callouts received a basic amount of data at run-time about the user who initiated an operation in Microsoft Dynamics CRM and the entity being acted upon.

      Plug-ins receive a wealth of information at run-time. For more information, see the following What’s New topic.

    • Supported messages

      Callouts could only be executed in response to a subset of messages that were processed by the Microsoft Dynamics CRM platform.

      Plug-ins can execute in response to most messages being processed by the platform.

    • Mode of execution

      Callouts were executed synchronously as part of the main execution thread of the platform. Callouts that performed a lot of processing could reduce overall system performance.

      Plug-ins can execute both synchronously and asynchronously. Asynchronous registered plug-ins are queued to execute at a later time and can incorporate process-intensive operations.

    For further information you may also reffer: http://msdn.microsoft.com/en-us/library/dd393295.aspx

    Jehanzeb Javeed

    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Monday, August 1, 2011 5:53 AM