Microsoft Dynamics CRM 2011 Improvements–Solutions
Microsoft Dynamics CRM (Or just CRM) has recently upgraded from version 4.0 to version 2011. For an overview of Microsoft Dynamics CRM head here: http://crm.dynamics.com. With this new release there have been many improvements to the system. One of the improvements that I think has great potential is the introduction of Solutions.
What is a Solution?
Solutions are essentially a container that holds the customization components supported by CRM. Solutions can hold many different components including Entities, Web Resources, Plug-ins, Reports, and Processes. A complete view of the Components is shown on the left below.
Solutions can be versioned and they are imported and exported as a whole. This single unit of software makes a re-deployment or upgrading a clients system a lot easier to manage for not only us, but also the client.
What did we have in CRM 4.0?
In CRM 4.0, there was no concept of solutions. Entities and their Forms could be exported with Workflows, but other components such as reports and plug-ins would have to be deployed individually.
In order to deploy a new report into CRM 4.0, we would first have to create a new report in the destination organization. After the place-holder report was created, we could then import the .rdl file in. This would not carry over all of the parameters associated with the report though. Any report scheduling, default filters, and categorization of the report would have to be setup in the new organization. Another challenge is that since a new report was created, it would be assigned a new GUID. This GUID would not be synchronized between these organizations, and this would prove to introduce new challenges. All of these challenges would have to be taken into consideration every time a report is deployed. If an organization has many reports, this will consume a lot of time, and it will leave a lot of room for mistakes. In CRM 2011 the reports are included in a solution, which means that they will all be deployed at once, and they will contain all of this information. This reduces the load on both the developers and the client, and is a way to better the synchronization across organizations.
In CRM 4.0 plug-ins were deployed using the Plug-in Registration Tool. This is an external tool that is used to deploy plug-ins and associate steps that determine when they are triggered. This tool requires remote access to the CRM Server, and an additional Deployment Administrator privilege which must be granted by the host. In order to deploy a plug-in to the destination organization, the client would need to use this tool to import an xml containing a definition for the plug-ins. This may not be the hardest, but it does make room for error, and there is no way of telling which versions of the plug-ins are installed. In CRM 2011, plug-ins are deployed inside of solutions. They still do need to be deployed by the Plug-in Registration Tool, but only the first time. After the initial deployment, they can be imported to a new organization along with the other components, and it does not require any privileges outside of CRM.
Another great benefit of Solutions is Web Resources. In CRM 4.0, custom pages would have to be deployed to the \ISV folder. Just like plug-ins, a user would have to have access to the server, and deploy them to that folder. After the files were copied over, the user may have to set it up correctly in IIS. This would be a manual process that would have to occur for every re-deployment. In CRM 2011, they introduced a component called Web Resources. This provides a way to package custom files into CRM, without requiring access to the CRM server or IIS. More information about Web Resources can be found here: http://msdn.microsoft.com/en-us/library/gg309473.aspx.
Solutions can be in a managed or unmanaged state. An unmanaged solution is essentially a work in progress. It is a container for the components that are on top of managed solutions and the system. You can add or remove components to an unmanaged solution and modify it as you see fit. Think of it as the source. An unmanaged solution can be exported as either unmanaged or managed. When a managed solution is imported into another organization, this means that the solution is locked, and cannot be changed. The solution itself cannot be changed, but it is possible to build upon it.
Multiple solutions can be installed in the same organization, and solutions can also be removed. If an un-managed solution is removed, the components stay as a part of the default solution (they still exist, the system does not change).
Removing a managed solution will remove the components completely unless other solutions use them. This makes it possible to import a solution, test it, see if you like it, then delete it if necessary.
Note: Two unmanaged solutions can not contain different definitions for a single entity.
Note: You can no longer export a single entity (ie: SiteMap). A temporary solution has to be created. Add SiteMap to it. Export as unmanaged. Modify it as necessary. Import it back into the system. Remove the temporary solution. This entity is then updated in the “main” solution as per the note above.
Updating a solution maintains customizations that are performed by the client. This means that the client can rearrange and modify entities and forms while new versions are still being developed. Components that support merging are automatically recalculated when the solution is updated (Eg: ribbons, forms, sitemap, and option sets). In the case of a non-merge, the last solution that is imported will win (Eg: Two separate solutions have made modifications to the Contact entity. Solution1 has renamed it to Person, and Solution2 has renamed it to Character. If Solution1 is imported, then Solution2 is imported, this will cause a non-merge because the Contact entity can only have 1 name. After the solutions are imported, the Contact entity will be named Character).
Note: In order to prevent non-merge scenarios for the Ribbon, A best practice is to NOT repurpose buttons. It is better to remove unwanted buttons and create new ones for your specific needs. This will prevent an outside solution from modifying your work.
Note: Using the default solution is a similar model to CRM 4. Nothing is tracked, and it contains every customization.
Note: When deploying a single “idea” to a client, it may be best to use a single solution. If you are deploying two distinct ideas, where the two ideas do not contain any of the same components, it may be better to deploy as two solutions.
Note: It is possible to deploy the same solution to CRM Online and CRM On-Premise. This does not change the fact that plug-ins deployed online must run in the sandbox, reports deployed online must use Fetch XML instead of SQL queries, and custom workflow activities cannot be deployed online.
Solutions are essentially a way to package everything necessary for a CRM deployment. Solutions can save time during deployments, and ensure reliability to a higher degree. It is possible to version solutions, and this makes it possible to ensure all of the components are up to date. Solutions make it possible for a non-power CRM user to effectively deploy customizations to an organization. The addition of Solutions in CRM 2011 focuses on helping the process of managing customizations.
Robert Lanzilli (firstname.lastname@example.org)