Import, update, and export solutions in Dynamics CRM 2013

How often you import, update, or export solutions may depend on the size of your organization, your internal development practices, and whether you are developing a solution that is to be distributed as a managed solution.

  • If you have a small organization with few customizations, and you’re the only customizer, you may never export or import solutions except to periodically export the default solution to create a backup or if you choose to use or buy a managed solution provided by someone else.
  • Some organizations will have an outside company create customizations for them. In this case, they’ll export any customizations that they currently have and send them to the outside company. That company will develop and test customizations and send them back to the organization to be imported.
  • Large organizations may have several teams of people customizing the system. They may have a separate organization just for development and customizations. These organizations frequently also have a separate test organizations and a UAT (User Acceptance Testing) organizations in addition to a production organization which everyone in the organization actually uses. These organizations depend on exporting and importing customizations from one organization to the next in the process of creating, testing, and verifying the solutions.

The strategy you choose should depend on your needs. Some important things to keep in mind:

  • You can’t export your default solution as a managed solution.
  • We don’t support importing a default solution taken from an on-premise deployment into a CRM Online organization or a default solution taken from a CRM Online organization into an on-premises deployment. We do support importing custom solutions between these deployment types, but not default solutions.
  • Custom solutions developed using Microsoft Dynamics CRM 2011 can be imported into Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online organizations.
  • Custom solutions developed using future versions of Microsoft Dynamics CRM cannot be installed into earlier versions without first being ‘down-leveled’ to match the earlier version.
  • When you export a managed solution, you can’t import it back into the organization it was imported from.
  • Only export a solution as a managed solution when you intend to distribute it.
  • Never import an unmanaged solution unless you are sure you want to accept all the customizations in it and allow any of those customizations to overwrite any customizations you previously created.
  • Solutions can’t delete anything. Importing an unmanaged solution might overwrite existing customizations, but it can’t entirely remove them. For example, if you create a custom field for an entity, and then import a solution containing the definition of that entity that doesn’t have the custom field, the custom field you created will still be there. Also, any changes defined within the solution you imported will be there.
  • You can’t import a custom entity with the same name as an existing entity. Microsoft Dynamics CRM allows duplicate display names, though.
  • You must have the System Administrator security role to import security roles, organization settings, sdk message processing steps, and plug-in assemblies.
  • If you import customizations that include a language that is not installed on your system, any labels defined in the customizations will default to the base language of the Microsoft Dynamics CRM system the customizations were imported from.
  • All imported security roles will be attached to the root business unit.
  • If an imported security role originated from the same CRM system, any changes applied to the security role will be merged. All privileges on system entities for the security role will be replaced by privileges defined by the security role that is being imported.

1. Import Solutions:

You can import solutions manually using the steps below. Only import solutions that you’ve obtained from a trusted source. Customizations might include code that can send data to external sources.
IUESolutions1
1. Navigate to Settings -> Solutions.
2. In the solutions list menu choose Import.
3. In the Import Solution dialog, Select Solution Package step browse to the compressed (.zip or .cab) file that contains the solution you want to import.
4. Click Next
5. You can view information about the solution before you click Import.
6. You may need to wait a few moments while the solution import completes. If it is successful, you can view the results and click Close.
If you have imported any changes that require publishing, you must publish customizations before they will be available.

If the import isn’t successful, you will see a report showing any errors or warnings that were captured. You can click Download Log File to capture details about what caused the import to fail. The most common cause for a solution import to fail is that the solution did not contain some required solution components.

When you download the log file, you will find an XML file that you can open using Microsoft Office Excel and view the contents.

2. Update Solutions:

There are times when you may wish to install an update to an existing managed solution. The procedure is similar to installing a new managed solution, except you will get some different options. If you are updating a solution you got from someone else, you should get guidance from the solution publisher about which options you should choose.

1. Navigate to Settings -> Solutions.
2. In the solutions list menu choose Import.
3. In the Import Solution dialog, Select Solution Package step browse to the compressed (.zip or .cab) file that contains the solution you want to update.
4. Click Next
5. You can view information about the solution before you click Next. This page will display a yellow bar saying This solution package contains an update for a solution that is already installed.
 IUESolutions2
6. You will have the following options:

  • Maintain customizations (recommended): Selecting this option will maintain any unmanaged customizations performed on components but also implies that some of the updates included in this solution will not take effect.
  • Overwrite Customizations: Selecting this option overwrites any unmanaged customizations previously performed on components included in this solution. All updates included in this solution will take effect.

Choose the appropriate option and then click Next.
7. You may need to wait a few moments while the solution import completes. If it is successful, you can view the results and click Close.
 If you have imported any changes that require publishing, you must publish customizations before they will be available.

Solution publishers may ask you to export your existing unmanaged customizations, update their managed solution using the option to overwrite customizations, and then re-import your unmanaged customizations. This will help ensure that the changes they are expecting are applied while preserving your customizations.

3. Export Solutions:

We recommend that you export your unmanaged customizations periodically so that you have a backup in case anything happens. You cannot export managed solutions.

1.    Navigate to Settings -> Solutions.
2.    In the list select the solution you want to export and click Export.
3.    In the Publish Customizations step you will be reminded that only published customizations are exported and you will have the option to Publish All Customizations before you click Next.
4.    If your solution contains any missing required components you will see the Missing Required Components step. You can disregard this warning only if you intend to import this as an unmanaged solution back into the original organization. Otherwise, follow the instructions in the dialog to cancel the export and add the required components.
5.    In the Export System Settings (Advanced) step you can choose certain system settings to include in your solution. If your solution depends on any of the groups of system settings, select them and click Next. See Settings options for solution export for details about the settings that will be included with each option.
6.    In the Package Type step, you must choose whether to export the solution as an Unmanaged or Managed solution.
7. Click Export to download the solution file.

The exact behavior for downloading files varies between browsers.

 4. Settings options for solution export: The following table shows the options available when you export a solution, based on your selection following system settings will be applied when solution is imported.

IUESolutions3

Group Setting Description
Auto-numbering Campaign Prefix Prefix used for campaign numbering.
Case Prefix Prefix to use for all cases throughout Microsoft Dynamics CRM.
Contract Prefix Prefix to use for all contracts throughout CRM.
Invoice Prefix Prefix to use for all invoice numbers throughout CRM.
Article Prefix Prefix to use for all articles in CRM.
Order Prefix Prefix to use for all orders throughout CRM.
Unique String Length Number of characters appended to invoice, quote, and order numbers.
Calendar Calendar Type Calendar type for the system. Set to Gregorian US by default
Date Format Code Information about how the date is displayed throughout Microsoft CRM.
Date Separator Character used to separate the month, the day, and the year in dates throughout CRM.
Max Appointment Duration Maximum number of days an appointment can last.
Show Week Number Information that specifies whether to display the week number in calendar displays throughout CRM.
Time Format Code Information that specifies how the time is displayed throughout CRM.
Week Start Day Code Designated first day of the week throughout CRM.
Customization Is Application Mode Enabled Indicates whether loading of CRM in a browser window that does not have address, tool, and menu bars is enabled.
Allow Unresolved Address E-mail Send Indicates whether users are allowed to send e-mail to unresolved parties (parties must still have an email address).
Ignore Internal E-mail Indicates whether incoming e-mail sent by internal CRM users or queues should be tracked.
Max Tracking Number Maximum tracking number before recycling takes place
Render Secure Frame For E-mail Flag to render the body of e-mail in the webform in an IFRAME with the security=’restricted’ attribute set. This is additional security but can cause a credentials prompt.
Tracking Prefix History list of tracking token prefixes.
Tracking Token Base Base number used to provide separate tracking token identifiers to users belonging to different deployments.
Tracking Token Digits Number of digits used to represent a tracking token identifier.
General Block Attachments Prevent upload or download of certain attachment types that are considered dangerous.
Currency Format Code Information about how currency symbols are placed throughout CRM.
Currency Symbol Currency Symbol
Full Name Display Order Order in which names are to be displayed throughout CRM.
Is Get Started Pane Content Enabled Get Started Pane was removed with Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online.
Presence Enabled Information on whether IM presence is enabled.
Negative Format Information that specifies how negative numbers are displayed throughout CRM.
Number Format Specification of how numbers are displayed throughout CRM.
Pricing Decimal Precision Number of decimal places that can be used for prices.
Share To Previous Owner On Assign Information that specifies whether to share to previous owner on assign.
Marketing Allow Automatic Response Creation Indicates whether automatic response creation is allowed
Allow Automatic Unsubscribe Indicates whether automatic unsubscribe is allowed.
Allow Automatic Unsubscribe Acknowledgement Indicates whether automatic unsubscribe acknowledgement email is allowed to send.
Allow Marketing E-mail Execution Indicates whether marketing e-
Outlook Synchronization Allow Address Book Synchronization Indicates whether background address book synchronization in Microsoft Office Outlook is allowed.
Allow Offline Scheduled Synchronization Indicates whether background offline synchronization in Microsoft Office Outlook is allowed.
Allow Scheduled Synchronization Indicates whether scheduled synchronizations to Outlook are allowed.
E-mail Send Polling Frequency Normal polling frequency used for sending email in Outlook.
Min Address Synchronization Frequency Normal polling frequency used for address book synchronization in Outlook.
Min Offline Synchronization Frequency Normal polling frequency used for background offline synchronization in Outlook.
Min Synchronization Frequency Minimum allowed time between scheduled Outlooksynchronizations.
Auto-Tag Max Cycles Maximum number of aggressive polling cycles executed for e-mail auto-tagging when a new email is received.
Auto-Tag Interval Normal polling frequency used for email receive auto-tagging in outlook.
Relationship Roles Relationship Role Settings Relationship roles is a feature that was deprecated in Microsoft Dynamics CRM 2011 and replaced with the Connections feature. People who upgraded from Microsoft Dynamics CRM 4.0 could continue using Relationship Roles with Microsoft
ISV Config Service Calendar Appearance Configuration In Microsoft Dynamics CRM 4.0 ISV Config provided all the capabilities to create custom buttons and form navigation capabilities. In Microsoft Dynamics CRM 2011 all these capabilities were moved to other areas leaving behind only the ability to define visual styles for service calendars.

Solutions in Dynamics CRM 2013

1. Solutions:
Solutions exist so that a set of customizations can be purchased, shared or otherwise transported from one organization to another. You can get solutions in the Microsoft Dynamics Marketplace or from an independent software vendor (ISV). A CRM solution is a file that you can import to apply a set of customizations.
If you are just interested in customizing your organization, here is what you need to know about solutions:

  • Creating solutions is optional. You can customize your CRM system directly without ever creating a solution.
  • When you customize the CRM system directly, you work with a special solution called the Default Solution. The Default Solution contains all the components in your system.
  • You can export your Default Solution to create a backup of the customizations you have defined in your organization. This is good to have in a worst case scenario.

2. Solution Components:
A solution component represents something that you can potentially customize. Anything that can be included within a solution is a solution component.
Solutions1
The following is a list of solution components that you can view within a solution:

  1. Application Ribbon
  2. Article Template
  3. Business Rule
  4. Chart
  5. Connection Role
  6. Contract Template
  7. Dashboard
  8. Email Template
  9. Entity
  10. Entity Relationship
  11. Field
  12. Field Security Profile
  13. Form
  14. Mail Merge Template
  15. Message
  16. Option Set
  17. Plug-in Assembly
  18. Process
  19. Report
  20. Sdk Message Processing Step
  21. Security Role
  22. Service Endpoint
  23. Site Map
  24. Web Resource

Most solution components are nested within other solution components. For example, an entity contains forms, views, charts, fields, entity relationships, messages and business rules. Each of those solution components requires an entity to exist. A Field can’t exist outside of an entity. We say that the Field is dependent on the Entity. There are actually twice as many types of solution components as shown in the list above, but most of them are not visible in the application.
The purpose of having solution components is to keep track of any limitations on what can be customized using Managed properties and all the Solution dependencies so that it can be exported, imported, and (in managed solutions) deleted without leaving anything behind.

3. Managed and unmanaged solutions:
A managed solution can be uninstalled after it is imported. All the components of that solution are removed by uninstalling the solution.

When you import an unmanaged solution, you add all the components of that solution into your default solution. You can’t remove the components by uninstalling the solution.

When you import an unmanaged solution that contains solution components that you have already customized, your customizations will be overwritten by the customizations in the unmanaged solution. You can’t undo this.

Note: Install an unmanaged solution only if you want to add all the components to your default solution, and overwrite any existing customizations.

Even if you don’t plan on distributing your solution, you might want to create and use an unmanaged solution to have a separate view that only includes those parts of the application that you have customized. Whenever you customize something, just add it to the unmanaged solution that you created.

You can only export your Default Solution as an unmanaged solution.

To create a managed solution, you choose the managed solution option when you export the solution. If you create a managed solution, you can’t import it back into the same organization you used to create it. You can only import it into a different organization.

4. How solutions are applied:
All solutions are evaluated as layers to determine what your CRM application will actually do. The following diagram shows how managed and unmanaged solutions are evaluated and how changes in them will appear in your organization.
Solutions2
Starting from the bottom and working up to top:

– System solution:  The system solution is like a managed solution that every organization has. The system solution is the definition of all the out-of-the box components in the system.

– Managed Solutions:  Managed solutions can modify the system solution components and add new components. If multiple managed solutions are installed, the first one installed is below the managed solution installed later. This means that the second solution installed can customize the one installed before. When two managed solutions have conflicting definitions, the general rule is “Last one wins”. If you uninstall a managed solution, the managed solution below it takes effect. If you uninstall all managed solution, the default behavior defined within the System solution is applied.

– Unmanaged Customizations: Unmanaged customizations are any change you have made to your organization through an unmanaged solution. The system solution defines what you can or cannot customize by using Managed properties. Publishers of managed solutions have the same ability to limit your ability to customize solution components that they add in their solution. You can customize any of the solution components that do not have managed properties that prevent you from customization them.

– Application Behavior: This is what you actually see in your organization. The default system solution plus any managed solutions, plus any unmanaged customizations you have applied.

– Managed properties: Some parts of Microsoft Dynamics CRM can’t be customized. These items in the system solution have metadata that prevents you from customizing them. These are called managed properties. The publisher of a managed solution can also set the managed properties to prevent you from customizing their solution in ways they do not want you to.

– Solution dependencies: Because of the way that managed solutions are layered some managed solutions can be dependent on solution components in other managed solutions. Some solution publishers will take advantage of this to build solutions that modular. You may need to install a ‘base’ managed solution first and then you can install a second managed that will further customize the components in the base managed solution. The second managed solution depends on solution components that are part of the first solution.

CRM tracks these dependencies between solutions. If you try to install a solution that requires a base solution which is not installed, you will not be able to install the solution. You will get a message saying that the solution requires another solution to be installed first. Similarly, because of the dependencies, you cannot uninstall the base solution while a solution which depends on it is still installed. You have to uninstall the dependent solution before you can uninstall the base solution.

Every solution has a Publisher. The default solution has a publisher named “Default Publisher for <your organization name>”.

– Solution publisher: The publisher record contains a Prefix value. The default value of this prefix is “new”. When you create new solution components this prefix will be appended to the name. This is a quick way that allows people to understand what solution the components are part of.

Before you start customizing the system we recommend that you change the Prefix value for the default publisher to something that identifies your company.

To change the Solution Publisher Prefix for the default publisher:

1. Navigate to Settings -> Customizations.
2. Select Publishers.
3. If there is more than one publisher, open the one with the Display Name that starts with Default Publisher for <your organization name>.
4. At the bottom of the form update the Prefix field to change the default value of ‘new’ to something that identifies your organization.
5. When you change the value, make sure to tab to the next field. The Option Value Prefix will automatically generate a number based on the customization prefix. This number is used when you add options to option sets and provides an indicator of which solution was used to add the option.

5. Publishing customizations:
Certain customizations that make changes to the user interface require that they be published before people can use them in the application. Publishing provides a way for you to save your work before you have finished and then come back and finish at a later time. Publishing is only required when you change a solution component. When you create or delete a solution component publishing occurs automatically. Before you export a solution you will be prompted to publish customizations. This is because any unpublished customizations will not be included in the solution.

When you perform customizations that will appear in Microsoft Dynamics CRM for tablets you should always explicitly publish your customizations to make sure that every item is synchronized with the CRM for tablets application.

Note: Publishing customizations can interfere with normal system operation. In a production environment we recommend that you schedule publishing customizations when it’s least disruptive to users.
The following solution components require publishing when they are updated:

  • Application Ribbon
  • Entity
  • Entity Relationship
  • Field
  • Form
  • Message
  • Option Set
  • Site Map
  • Web Resource