Power Platform solutions are containers to transport apps and other Power Platform components such as flows or Dataverse custom tables from one environment to another

There are several ways a solution can be updated. In this post I’ve summarised those options and some of the key points relating to each

Power Platform Solutions

Importing a Solution

Solutions can be managed or unmanaged. A managed solution can’t be amended in the target environment. For this reason, managed solutions are deployed to test and production environments. Components in unmanaged solutions can be amended and are used to transfer components to another development environment or to source control

When importing a managed solution, if a previous version of the solution is detected, this is recognised and the following options are offered:

Upgrade (the default option)

  • Upgrade the existing solution to the version being imported
  • Rolls up any previous patching into the new version
  • Deletes any components in the previous version that are not in the newer solution

Stage for Upgrade

  • Upgrades the solution to the new version, but doesn’t delete the previous version or any related patches
  • This option should only be selected if you want to have both the old and new solutions installed in the system concurrently, for example to do some data migration before you complete the solution upgrade

Update

  • Replaces the solution with the newer version
  • Components that are not in the newer solution are not deleted

Patching (Cloning a Patch)

A patch contains changes to the parent solution. Typically a patch is a minor change to just a single component or a small number of components

  • You don’t have to include components in a patch that aren’t being changed
  • A patch can add or update components in the parent solution, but it can’t delete any components from the parent solution
  • A parent solution can have multiple patches
  • A patch is created from an unmanaged solution. A patch cannot be created from a managed solution
  • When a patch is exported, it should be as a managed patch. Unmanaged patches should not be used in production environments
  • The parent solution must be present in the target system in order to install a patch.
  • A patch can be deleted or updated
  • After you have created the first patch for a parent solution, the solution becomes locked. A locked solution can’t be changed or exported. In order to make further changes to the solution another patch has to be created or the solution cloned

Clone a Solution

When you clone an unmanaged solution, the original solution and all patches related to the solution are replaced a newly created version of the solution

  • A cloned solution is unlocked, so components can be added, edited, or deleted
  • A cloned solution represents a replacement of the base solution when it’s installed on the target system as a managed solution. Typically, a cloned solution is used to ship a major update

Summary

When importing a managed solution, use the upgrade option unless there is a specific reason not to

While a patch exists for a solution, the solution is locked and cannot be directly edited. Multiple patches can be created for a solution

Cloning a solution incorporates and deletes all the existing patches. A cloned solution is unlocked and so can be edited directly

Patching too frequently isn’t recommended because it increases complexity when storing your solution in a source control system

Here’s a great vid from Brian Knight of Pragmatic Works demonstrating the step-by-step process of patching and cloning

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top