When importing a managed solution, a decision is required to either upgrade or update the existing solution.
Upgrades are intended for deploying significant changes, like new features, structural changes, or adding new tables.
The ‘Stage for Upgrade’ option allows the installation of the new solution without removing the existing solution, reducing risk. Once proven, the staged solution can replace the existing version. Alternatively it can be removed, rolling back to the previous version.
An Update is intended for small, incremental changes to a solution, such as adjusting settings, amending the UI, or fixing minor issues.
The version number of the imported solution is defined when the solution is exported from the source environment. For details on the versioning of solutions, see my post: Solution Version Numbering.
Lets look at upgrades and updates in more detail.
Initial Import of a Solution
The first time a solution is imported, no update or upgrade options are available under Advanced Settings.
This is understandable, as an update or stage for upgrade can’t take place on a solution that doesn’t yet exist.
Once imported, the new solution with its version number can be seen in the Power Apps portal.
Updating a Solution
Now to import a new version 1.1.0.0.
All 3 options are available. I select update, to update the existing solution
Importing A Patch
A patch is created in the source environment. When importing a patch, no upgrade or update option is offered, as patches must be installed as an update.
When the patch has been installed. It can be seen alongside the main solution
Importing A 'Clone to Solution'
Because a Clone to Solution contains rolled up patches, when importing, it has to be an upgrade and can’t be an update, so the update option is greyed out.
I select upgrade and once imported, the previous solution and the patch have been replaced by the new solution
Stage For Upgrade
Here I have installed a new version 1.2.0.2 of the solution, and I select ‘Stage for Upgrade’.
As you can see below, both the previous solution version 1.2.0.1 and the new version 1.2.0.2 co-exist.
Once the new solution has been confirmed to be working as expected, the previous solution can be removed. This is done by selecting the previous solution and clicking ‘Apply Upgrade’
Once done, only the new version of the solution now exists in the environment
Alternatively, to remove the update, select ‘Delete’ from the menu
Which leaves just the previous version in the environment
Which leaves just the previous version in the environment
Upgrading A Solution
Finally, I have a new major version 2.0.0.1 of the solution, and I can select any of the options, but for a major version, upgrade (or stage for upgrade) would be the appropriate choice.
Viewing History
Finally, to view the history of a solution, select ‘See history’