The Science of Upgrading Dynamics 365 Power Platform Solutions

This is a final post in the solution deployment series and we will see how we can upgrade the solution that we created in my previous posts. If you would like to understand what are solutions and how to use them please visit my previous three posts where I talked about How to create a solution, how to create a solution patch and how to merge solution patches together.

For delivering new functionality for an existing unmanaged solution that you have released as a managed solution package we have the option of versioning which a customer can use to upgrade the existing managed solution. To create that upgrade package reference the previous post. In this case we have the solution 9.2.0.0 already imported into our managed box(production) and we are going to import our new release 9.3.0.0 managed solution.

Production currently has 9.2.0.0 (managed)

 

We will click on import and select the downloaded managed version 9.3.0.0

Once we click next, the wizard will recognize that we already have an older version in our production environment and the version we are importing is different

Once we click next, we will get the below options, lets discuss these in detail. The Solution Action decides what we would like the wizard to do with the previous version of the existing solution on our target environment, the correct answer depends on the end result you would like to achieve.  Upgrade(recommended) will merge your previous solution and patches and replace your previous solution with the new one entirely, what entire means is that if you had an option set in your previous solution that you removed a value from in your new version this option set will no longer have the old value once the upgrade is complete. Stage for Upgrade performs the same upgrade in the first step but in a staged manner, meaning first your solution is imported but the replacement part is not done until you go through the apply solution upgrade process. I personally always follow the stage for upgrade process in order to ensure complete import of a large release before I move on to the upgrade itself; important thing to note on here is newer power platform only components such as canvas apps and flows get replaced even if you Only stage for Upgrade.

Update(not recommended) also replaces your old solution with the new one but does not replace entirely, meaning in the scenario I mentioned above for the option set, the value will not be removed and you will see all new values as well as old values.

 

The second part of selection is deciding what to do with the unmanaged layer on the target environment of the objects that are included in your solution. Maintain customization will not try to delete your active layer and simply import your managed release, specially helpful if you are in the unfortunate position of having an unmanaged solution layer on your production environment and its too late to clean it up and go back to a fully managed solution stack. Overwrite customization tries to delete the unmanaged layer in your target environment for the included objects in your solutions wherever possible. If you have maintained a clean managed layer stack box I would recommend going with this option.

Once our import is complete, since we selected the stage for upgrade option we will see the screen below; with an option of applying the upgrade right from here. Clicking it will carry out the complete upgrade. You can also do that by going into your solutions and selecting the old version and clicking on Apply solution upgrade(see below)

If we don’t apply the upgrade from above window, your new version will sit in a staged position waiting to be upgraded and you will see both solution in the system as below:

From here we need to select the older version and then click on apply Solution Upgrade, which will upgrade your solution.

Happy solutioning!

Merging D365 Power Platform Solution Patches into a Major Version Update

If you would like to understand what are solutions and how to use them please visit my previous two posts where I talk about How to create a solution and how to create a solution patch. In this post we will see how we can merge the patches we created and create a Major version update of the solution for release.

 

To start off we will create another patch on top of the existing 9.1.0.0 base solution and the patch 9.1.1.0

To create another patch, select the base solution and click on Clone a Patch

This will create the second patch and versioning will stay in order

To create a major release we will follow what is called the cloning process. The good thing about following the patch approach and sticking to the recommended versioning is that our cloning will merge all patches together along with the base solution when we create a major version. In order to do so we will select the base solution, in this case 9.1.0.0 and click on Clone Solution

As we can this time the process recommends the next major version which is 9.2.0.0 instead of 9.1.3.0. When we click save the base solution and all patches will be merged automatically and we will end up with a single solution versioned as 9.2.0.0 this will be the solution we export in order to do a version upgrade at the managed box end (more on that in later posts)

 

To read more on patches please visit, https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/use-segmented-solutions-patches-simplify-updates