Introduction to solutions
Applies To: Dynamics CRM 2013
Solutions are how customizers and developers author, package, and maintain units of software that extend Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online. Customizers and developers distribute solutions so that organizations can use Microsoft Dynamics CRM to install and uninstall the business functionality defined by the solution.
In This Topic
Unmanaged and managed solutions
Support for multiple languages
Use solutions to extend the capability of Microsoft Dynamics CRM. For software that operates outside the application, use traditional methods to package and install your application, such as an installer program.
If your application consists only of Microsoft Dynamics CRM solution components, it can be imported directly into CRM. You won’t have to create an installer program.
However, if your extensions include a combination of Microsoft Dynamics CRM solution components and external components, which are not Microsoft Dynamics CRM solution components, you’ll need an installer.
For example, you can create a .NET Framework application that manages data stored in custom Microsoft Dynamics CRM entities using the web service APIs. People who install your application may install a Microsoft Dynamics CRM solution to create the custom entities and then install your application separately by using an installer. Or, you could include the installation of the Microsoft Dynamics CRM solution into the installer you create for your application.
Solutions exported from an earlier version of CRM can be imported into newer versions. However, solutions exported from newer versions can’t be imported into earlier versions. This includes major and minor versions.
So, if you exported a solution from a Microsoft Dynamics CRM 2011 environment or a Microsoft Dynamics CRM Online organization prior to the Microsoft Dynamics CRM Online Fall ‘13 release, you can import the solution into organizations that are using the initial release of Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online Fall ‘13. However as updates are applied that include new features or metadata definitions, you can’t include these new features or definitions in a solution that will be installed on an organization that is using an earlier version of CRM.
Solution components are created by using the customization tools or APIs included in Microsoft Dynamics CRM and are fully hosted in the application. The following diagram shows the types of solution components.
When you define a CRM solution you create a group of solution components that can be managed together.
Solutions can only add new solution components or overwrite existing solution components. Solutions can’t be used to delete solution components.
Unmanaged and managed solutions
There are two types of Microsoft Dynamics CRM solutions: managed and unmanaged. A managed solution is a completed solution that is intended to be distributed and installed. An unmanaged solution is one that is still under development or isn’t intended to be distributed. When the unmanaged solution is complete and you want to distribute it, export it and package it as a managed solution.
The following diagram introduces how managed and unmanaged solutions interact with the system solution to control application behavior.
The system solution represents the solution components defined within Microsoft Dynamics CRM. Without any managed solutions or customizations, the system solution defines the default application behavior.
Many of the components in the system solution are customizable and can be used in managed solutions or unmanaged customizations.
Managed solutions are installed on top of the system solution and can modify any customizable solution components or add more solution components.
Managed solutions can also be layered on top of other managed solutions. As long as a managed solution enables customization of its solution components, other managed solutions can be installed on top of it and modify any customizable solution components that it provides.
All customizable solution components provided by the system solution or any managed solutions can be customized in the unmanaged customizations.
Unmanaged solutions are groups of unmanaged customizations. Any unmanaged customized solution component can be associated with any number of unmanaged solutions.
You create a managed solution by exporting an unmanaged solution and selecting to package it as a managed solution.
The ultimate behavior of an instance of Microsoft Dynamics CRM for a specific organization is the culmination of the system solution, any managed solutions, and any unmanaged customizations.
When a solution is unmanaged, you can perform the following actions:
Delete components that allow for deletion.
Export and import the unmanaged solution.
Export the solution as a managed solution.
More information: Create, export, or import an unmanaged solution
Importing unmanaged solutions
When you import an unmanaged solution, you can edit its components in the new organization.
When you import an unmanaged solution, the definitions of any solution components that already are in the organization will be overwritten. You can’t undo this action.
Each Microsoft Dynamics CRM organization contains customizable solution components. Together, all of these solution components are called the default solution. This is the solution you edit when you select Customize the System in the application. You can export this solution and the customizations in it in just like an unmanaged solution. However, you can’t export the default solution as a managed solution.
Create an unmanaged solution
If you don’t intend to generate a managed solution, you don’t have to create an unmanaged solution. You can customize the system directly. Organizations that just want to be able to edit, back up, and transport their customizations don’t have to use the more advanced capabilities of the Microsoft Dynamics CRM solutions framework.
When you create an unmanaged solution, you create a way to group a subset of the available customizable solution components. The solution components in an unmanaged solution are references to customizable solution components in the organization.
After you create an unmanaged solution, you can add solution components to it. By using this smaller set of components you can decide to only include those solution components that are relevant to a particular functionality. This allows for a smaller size package when you export your solution and makes a more manageable set of components.
Any components you add to your unmanaged solution are included in the customizable solution components for the system. Unmanaged solution components can be added to multiple unmanaged solutions.
Because each unmanaged solution contains a reference to the shared group of solutions, changes you make to solution components in one solution are also applied for all unmanaged solutions that reference those solution components.
You can also create unmanaged solutions just to provide convenient access to specific solution components. For example, you may use lots of HTML web resources but only some of them represent top-level user interface elements in your solution. You may want to create an unmanaged solution that includes only those top-level user interface components so that you can locate and open them easily.
Solution publisher for unmanaged solutions
Each solution requires a solution publisher. For an unmanaged solution, the solution publisher provides a common customization prefix and option value prefix. More information: Create a solution publisher
Many solutions can be associated with a single solution publisher. Each organization will have a solution publisher called “Default Publisher for <OrganizationUniqueName>”. If you want all your unmanaged solutions to share the same customization prefix and option value prefix, we recommend that you just associate your unmanaged solutions with the default publisher for your organization.
The solution publisher controls how managed solutions can be updated. When you install a managed solution, the publisher is visible but you can’t associate an unmanaged solution with it. If you intend to distribute a managed solution, see Solution publisher for managed solutions.
Delete an unmanaged solution
If you delete an unmanaged solution, you just delete the group used to contain references to solution components. The solution components in an unmanaged solution remain in the system but they are no longer associated with the unmanaged solution you delete.
If you delete a solution component in an unmanaged solution, it is deleted from the system and is no longer available from any other unmanaged solution. Use “remove” instead of “delete” if you just want to remove a solution component from an unmanaged solution.
If you intend to distribute your solution as a managed solution, export your unmanaged solution and select the Managed option in the Package Type dialog box.
After you generate a managed solution, you can’t install it in the same Microsoft Dynamics CRM organization that contains the unmanaged solution used to create it. It must be installed in a different organization.
After you install a managed solution, the following applies:
You can’t add or remove solution components in a managed solution.
You can’t export a managed solution.
Deleting a managed solution uninstalls all the solution components in it.
For more information about the specific tasks you can perform with managed solutions, see Create, install, and update a managed solution.
After you install a managed solution you may be able to customize the solution components if the creator of the managed solution has configured the managed solution to enable it. You must access the customizable solution components using Customize the System instead of through the managed solution itself.
Whether a solution component is customizable and what specific customization actions are enabled is controlled by using Managed properties.
Solution publisher for managed solutions
When you intend to distribute managed solutions, the solution publisher record associated with your managed solution is created in each organization that installs your solution. Use the solution publisher to provide information about how people who install your solution can contact you.
The solution publisher for a managed solution is also important if you want to release an update to your managed solution. If you use the same solution publisher you can create a new managed solution with the ability to update a managed solution you previously released. More information: Maintain managed solutions
Using managed properties, the creator of a managed solution can control whether a solution component is customizable and which specific parts of it can be customized.
Managed properties must be set in an unmanaged solution. The managed property settings are only applied after the managed solution has been packaged and installed.
The exact managed properties available depend on the type of solution component. The following screenshot shows the managed properties for a custom entity.
By default, the managed property settings assume that any kind of solution component is fully customizable. Solution developers are encouraged to enable solution components in their solutions to be customizable. However, there are situations where the definition of a solution component must be ”locked down” to avoid potential breaking changes or to make future maintenance of the solution component easier.
More information: Use managed properties
When two or more solutions define solution components differently, Microsoft Dynamics CRM resolves the conflict using two strategies, Merge and Top Wins. The following diagram illustrates the differences.
User interface components (command bar, ribbons, forms, and site map) are merged. This means that the solution components are re-calculated from the lowest level to the highest so that the organization’s unmanaged customizations are the last to be applied.
For all other solution components any conflict is calculated in favor of the customization that is applied last. For managed solutions this usually means that the last solution installed is applied. However, there is a special case when an update to a managed solution is installed.
Conflict resolution on the update of a managed solution
Because unmanaged customizations are considered ”above” any managed solution in terms of conflict resolution, organizations installing an update to a managed solution may not see their changes applied because of unmanaged modifications. An option exists to make sure that changes applied by an update to a managed solution are available.
When you release an update to a managed solution, the organization installing the update can select:
To preserve any customizations it has applied on top of your managed solution.
To overwrite any customizations it has applied on top of your managed solution.
Organizations installing an update to a managed solution should work with the managed solution creator to evaluate which option is best.
Changes to entity forms and the sitemap won’t be overwritten even when the overwrite option is selected. Refer to Merge form customizations and Merge navigation (SiteMap) customizations for guidance about managing changes. Some manual customization may be required to merge unmanaged customizations into changes included in an update to a managed solution.
The solutions framework automatically tracks dependencies for solution components. Every operation on a solution component automatically calculates any dependencies to other components in the system. The dependency information is used to maintain the integrity of the system and prevent operations that would lead to an inconsistent state.
As a result of dependency tracking, the following behaviors are enforced:
Deleting a component is prevented if another component in the system depends on it.
Exporting a solution warns the user if there are any missing components that could potentially cause failure when importing that solution in another system.
Warnings during export can be ignored if the solution developer intends that the solution is only to be installed in an organization where dependent components are expected to exist. For example, when you’re creating a solution that’s designed to be installed over a pre-installed “base” solution.
Importing a solution fails if all required components aren’t included in the solution and also don’t exist in the target system.
- Additionally, when you import a managed solution, all required components must match the package type of the solution. A component in a managed solution can only depend on another managed component.
More information: Dependency tracking for solution components
Support for multiple languages
Microsoft Dynamics CRM natively supports multiple languages. Whenever a language pack (sometimes referred to as a ”MUI pack”) is installed, user interface elements can be displayed in a different language.
There are a number of different tactics you should apply based on the type of solution components included in your solution. More information: Create solutions that support multiple languages
Package and distribute extensions using solutions
Plan for solution development
Dependency tracking for solution components
Create, export, or import an unmanaged solution
Create, install, and update a managed solution
Uninstall or delete a solution
Create solutions that support multiple languages
Work with solutions
Sample: Work with solutions
Sample: Detect solution dependencies