Improving Release management with Solutions in Dynamics CRM 2016

Earlier this year I gave a presentation on the challenges of CRM Release Management, one of the issues I identified was the problem of isolating customisations for concurrent release from the same development environment.

Prior to CRM 2016, adding an entity to a solution would add all its associated solution components such as relationships and fields, this meant that if another project solution also using the same entity it could potentially override the objects being customised and cause dependencies. Now With CRM 2016, this is no longer the case, as CRM 2016 solutions allows to add solutions component at attribute level, which allows you to isolate your customisation and reduce dependencies in your solutions and releases.

This also means that we can use the same development environment for customising a solution and other concurrent projects and isolate the solution components by using the Add Sub Component button, which allows adding Solution objects at Component level such as specific attributes, views, forms and relationships etc. as shown below ;

cid:<a href=

 Checking the Entity Metadata properties will include the settings available on the entity settings in customizations, properties such as Quick create, Menu display settings etc into the solution.

It still Includes option to Add all Assets if required, checking this will pull all the given entity’s components that are already included in the default solution.   I try to keep away from this option as it can’t be undone and I feel it defeats the purpose of the new solution features in 2016 to have detailed control over what is included in the solution.

 

Patching

Patching or Solution Updates is absolutely necessary in a constantly changing agile world where solution release is never complete, there will always be requirements for additions and changes. Previously we would apply the updated Version of the original solution, including the existing deployed customisations as well as new on top, accompanied by an updated solution number.

 

However Dynamics CRM 2016 incorporates the ability to create ‘Patches’ improving the release process by allowing you to isolate your new solution changes and automatically increments the solution version number, whilst deactivating the old version of the solution from being edited.

 

Clone a Patch: This feature allows creating a patch for an unmanaged solution. When you create a Patch from an existing solution it will render the existing ‘Base Solution’ to read only, and create a new Patch solution allowing you to add only the changes you want to make, as well as incrementing the version number of the Patch solution for you. This can help with change control when you’re not sure if anybody has made changes to the original solution, and you can clearly identify the new components for the next release. Only by deleting the Patch will return the unmanaged Base Solution to become editable again.

 

 

Clone a Solution: Creates a Duplicate copy of an unmanaged solution with an updated version number, and replaces the old solution file. Useful when you want to replicate your solution files and include versioning, preventing old solution files from being updated without a new version number.

 

 

Deleting A Clone will also delete the Base Solution as a Clone is virtually the Base Solution with an updated Version number. Remember that Deleting Unmanaged solution will not delete the actually solution components and customisations, only the solution ‘package’.

Apply Solution Upgrade

The Apply Solution Upgrade Button is different from the standard import Button as it allows you to specify importing an upgrade Patch for a given Base Solution.

Previously when updating a managed solution component, because CRM would rank the solution by the date it was installed it would automatically apply the change to the last updated managed solution, rather than targeting a specific solution. Now we can apply updates to specific solutions allowing more control when solution updates are applied.

 

 

Stage for Upgrade for Removing Managed Customisation 

Another limitation prior to CRM 2016 solution enhancement was deleting unwanted managed customisations from production, and required the use of a holding solution to be able to remove managed customisations. Although this provided a safe measure from losing data, it was traditionally seen as the Achilles heel in solutions being additive in nature. 

Now there is a new ‘Stage for Upgrade’ solution option, which is available for solution updates. However one must be warned when ticking this feature enables the ability to remove solution components that do not exist in the new version which will also result in loss of data for the given attribute. Managed Solution behaviour can become quite complex in an environment with a mixture of unmanaged and managed solutions from different sources, and

This will perform the Holding Action, removing the Old Solution Components and importing the new Solution Components.

A confirmation screen with the new components being updated before deleting the old components and importing the new solution. The ‘Apply Solution Upgrade’ button will display at the bottom when you are ready to apply the changes;

 

Again, please use this feature with caution as it could result in data loss in your production CRM if not performed without due considerations.

Note: A common mistake often made with solutions is Including required components, This is not normally required when required components already exist in the Target,  were only interested in including components that have been customised.

 

In Summary the new Dynamics CRM 2016 solution features address a collection of practical issues that occur during the CRM release cycle, and will definitely make CRM solutions a lot more manageable in the future;

·      Add sub components to entity so add specific customisations for your project, helping to reduce dependencies

·      Clone solution to automatically Version control your changes

·      Clone a Patch to isolate your new solution customisations

·      Apply Solution Upgrade to target specific solution for updates

·      Now with Built in ‘Stage for Upgrade’ provides Holding to Delete previous solution customisations if required



mm
Author: Raz Dynamics
Razwan is a Microsoft MVP and Dynamics 365 Community Moderator responsible for developing Microsoft Dynamics 365 and CRM integrated solutions for over a decade. Razwan is responsible for delivering Dynamics 365 User Groups & CRM Saturday Conferences. Raz has developed many free community utilities for Dynamics 365 and CRM which you can download from this blog.

2 Comments

Comments are closed.