"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу
Showing posts with label Plugin Deployment in CRM 2011 - Best Practices. Show all posts
Showing posts with label Plugin Deployment in CRM 2011 - Best Practices. Show all posts

Monday, 21 March 2011

Plugin Deployment in CRM 2011 - Best Practices

    As you all know, the new concept called 'Solution' which bundles the components was introduced in CRM 2011. Solutions could help us to deploy plug-ins in a very good manner. If you open a solution in CRM 2011 you could find out a section called 'Plug-in Assemblies'.


Now consider a scenario that we have a plug-in called myPlugin with steps Create and Update of Contact Entity. So let's register the plugin using the CRM 2011 Plugin Registration tool.



Once its registered, it would be available in our solution. So navigate to Plug-in Assemblies section of the solution and click on 'Add Existing button' . Then you would get the following window. All registered plugins would be listed here.



We could choose the plugin and then click OK.



So our plugin is added to the solution as shown above. So this is how we bundle the plugin in the solution. However its a very good practice to bundle the steps of plugin too. So lets consider the following 2 steps to be bundled in the solution.
Create Contact  & Update Contact steps


So navigate to 'Sdk Message Processing Steps' section of our solution which could be found just below the 'Plug-in Assemblies' section. And click on add existing option.


Choose the message steps as shown and then click OK.

As you could see the plugin message steps are added to the soultion.


Very Important step: Select the steps and click on Activate Button. Please don't forget this step


The key advantage of this practice is when you move the solution to another server for instance from development server to the production server, you don't need to deploy the plugins again. Because the plugins and steps are already wrapped with solution.
Related article: How to use ILMerge
http://crmdm.blogspot.com/2011/02/crm-cannot-find-plugin-assembly-or-one.html