Saturday, July 12, 2014

Solutions in CRM 2011

Dynamics CRM 2011 Solution Packages (“solutions”, for short) are packages of customization that allow you to build and maintain Dynamics CRM/xRM applications, and to move them from one organization to another. In fact, not only are they the best practice approach to moving customization from one CRM organization to another; but short of re-creating every customization from scratch they are the ONLY way to move customization. So there really is no option not to use them: unless you want to manually recreate every customization any time you provision a new organization, you must use solutions in Dynamics CRM 2011.

     A solution is originally created within the context of a Dynamics CRM organization. It’s important to distinguish between the organization a solution is originally created in, and a different organization it gets imported to. I’ll refer to the first one as the “Developer” or “Publisher” organization. Any custom functionality a solution provides (custom entities, workflows, form script, plug-ins, etc.) can be exported as part of a single unit. This unit is referred to as the solution package, and consists of a zipped up collection of XML files. When exporting a solution package from the organization it was developed in, there are two options: you can export a “Managed Solution”, or an “Unmanaged Solution”.

Managed solutions have the following features:
·        When imported to a different organization (you might refer to this as the “Consumer” organization) all of the customization are automatically published.
·        They can be uninstalled. Uninstalling a managed solution is a clean and complete uninstall: that is, all of a managed solution’s components are removed from the Target organization when the managed solution is deleted.
·        They can selectively expose components for customization in the consumer organization.    This is specified in the developer organization, where solution components can be specified as customizable or non-customizable. Customizable solution components of a managed solution are fully exposed and customizable in the consumer organization.
·        Versioning is built in to the managed solution architecture. For example, if “Solution A, version 1″ is imported, and subsequently “Solution A, version 2″ is imported, Dynamics CRM will recognize version 2 as a new version of the same solution and import/publish just the new features.
    They cannot be modified in or exported from a consumer organization.

Unmanaged solutions have the following features:
·        When imported into a consumer organization, their components must be published.
·        They cannot be uninstalled. (Any of their custom components can be deleted, but this must be done one at a time, unlike the one-click uninstall for a managed solution.)
·        They can be modified in or exported from a consumer organization, either as an unmanaged solution or a managed solution.

The last bullet-points in both sections may be confusing at first: it seems a little odd at first that you can import a managed solution you’ve created yourself and cannot modify the solution package in the target organization, but it’s true: while you can modify customizable components of a managed solution, you cannot modify the solution package itself, except for in the original (developer/publisher) organization. On the other hand, unmanaged solutions can be further modified in any way in the consumer organization, OR exported from it, either as a managed or unmanaged solution. That’s what unmanaged solutions are for.
Generally speaking, you can say the following:
·        If you’re a commercial software developer, or an enterprise developer/customizer, you will probably use managed solutions to distribute your CRM 2011 customizations: they give you clean uninstall capability, versioning with automatic upgrades, and the ability to selectively lock down components.
·        If you just want to move your customizations from one CRM 2011 organization to another, and don’t want any restrictions on what you can do with them in the target/consumer organization, that’s what unmanaged solutions are for.


No comments:

Post a Comment