In my last month’s blog, I highlighted new and improved features of Microsoft Dynamics CRM Solution Framework. I discussed about:
- Solution Components
- Clone a Patch
- Clone a Solution
In this month’s blog, I will discuss about “Applying a Solution upgrade”.
Apply Solution Upgrade
This feature is primarily dedicated to the large ISV community of Microsoft Dynamics CRM.
In the past, deleting a solution asset from a managed solution has always been a difficult and frustrating task. A number of steps were to be performed for deleting a solution asset.
A technique commonly referred to as holding solution process was used to delete a solution component. This approach required an in depth understanding of solution system and manipulation of solution.xml file. However, it also means putting the system at risk of being not supported by Microsoft, as manipulating the XML file is considered a violation of SDK contract.
For more details on Holding Solution Process, please refer to the following blogs
New improved approach
As you may realise, existing process requires a number of distinct steps to delete a component from the solution and may be more if there are oversights (which is highly likely considering the complexity of existing procedure).
In Microsoft Dynamics CRM 2016, this procedure has been incorporated into UX and SDK and is more of a two- step process from a user’s perspective.
Let’s consider following scenario.
Scenario: I have a solution with two custom entities (“Custom 1” and “Custom 2”). I want to delete “Custom 2” entity and add a new “Custom 3” entity.
- Start with an existing solution Solution A (18.104.22.168) in the source environment (usually development environment).
- Select Solution A (22.214.171.124) and click Clone Solution. Change the build number as required. E.g. Solution A (126.96.36.199) in this case.
- Modify Solution A (188.8.131.52) as per requirement. In this case, delete “Custom 2” entity and create new “Custom 3” entity.
- Create new “Custom 3” entity.
- Save and Publish All Customizations.
- Export Solution A (184.108.40.206) from source environment as managed solution and import into the target environment.
- When importing this solution into target environment, you can choose to select Stage for upgrade (Import as a holding solution) as shown below in Figure 8. This new option Stage for Upgrade is optional, if no patches exist. But required, if patches exist.
- Once the import process is finished, click Apply Solution Upgrade as shown in Figure 9 below. Apply Solution Upgrade step internally performs following actions in CRM
- Deletes any patches
- Deletes the original solution (old solution)
- Updates upgrade solution to the new name
- Once the process is complete, open solution A (220.127.116.11) in the target environment to verify the changes.
This new feature of Apply Solution Upgrade has extended Microsoft Dynamics CRM’s solution capabilities to the next level. It has successfully recognised following key points
- Removal of Solution assets from a managed solution using Solution upgrades
- Multiple developers can easily work on patches
- All patches can be rolled into a single solution