Saturday, June 4, 2016

Clone a Solution - Microsoft Dynamics CRM 2016

Microsoft Dynamics CRM 2016 introduces a new feature Solution Cloning "Clone a Solution" - It creates a copy of solution with new version in which all patches released from base solution are merged.

You can only clone an unmanaged solution. If you clone an unmanaged base solution, it will create a new solution with higher version(Major & Minor) than base solution. And all the patches released from base solution will be merged into the cloned solution.

A cloned solution can be exported both Managed and Unmanaged

Import cloned solution in target system:

Import feature of clone solution is a bit different from normal solution, when you import a clone solution you will see a message - "This solution package contains an update for a solution that is already installed"

Current Version: 1.0.0.0
Version contained in the update: 1.1.0.0



Click on Next




Here you get option "Stage for Upgrade". If you select this option a holding solution will be created. It means you will see both base solution and upgraded solution. But the upgrade will not take place, to apply upgrade you need to click on "Apply Solution Upgrade" on Solution explorer form.

Maintain Customizations: 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. 

Example: Suppose you have customized a field in default system solution and change its length from 50 to 100. If in case the cloned solution contains the same field with length 150. In this case maintain customization will retain the unmanaged customization i.e. field length will remain 100.

Overwrite Customizations: Selecting this option will overwrite any unmanaged customizations previously performed on components included in this solution. All updates included in this solution will take effect. From above example- In this case the field length will be updated to 150.

Clone a Patch: Refer Post

Thursday, June 2, 2016

Solution - Clone a Patch in Microsoft Dynamics CRM 2016

To perform and release customization in CRM from one system to another, usually we create "Solution", once done with customization(s) we export it either managed or unmanaged and deploy it to production.

Suppose a scenario where we have created a Solution (Solution-A), in that we have done some changes [added a new field say "new_field" length 50 for a entity] and deployed it to production.

Due to some reason now the requirement is to change the field length from 50 to 100. In earlier version to achieve it, either we directly update the field length in production or create a new solution (Solution-B) with all the changes and deploy it on production. 

To overcome this situation Microsoft Dynamics CRM 2016 introduces new feature "Clone a Patch". In which you can release fixes for the solution(s). In this scenario we can create Patch "Clone Patch" for Solution-A.

Benefits:
A. You can only create a patch Solution from a base Solution.
B. Patch solution can not be further patched.
C. There could be N no of patches from base Solution.
D. You can not install a patch if base solution is not available.
E. Patch solution version must have higher build and revision numbers and same major and minor version than base solution version.
F. Patches are only supported in CRM organizations of version 8.0 or later.
G. You can not update base solution, if it is patched.

Delete a Patch or Base Solution:

In the above example we have created two solutions (Solution-A and Solution-B). B is the patch for A and higher in version. To delete a base solution (Solution-A) 

Unmanaged : Then Solution-B must be deleted first then Solution-A

Managed: Solution-A can be deleted directly, Microsoft dynamics will remove all the patches in order from higher to lower version.