Introduction
In this article, we will see what a solution layer is and how we can add and remove unmanaged layers/ customizations to managed solution in the Power Platform solution. Before deployment of any new version of the managed solution, we need to remove unmanaged layers.
Solution Layers
As per Microsoft's definition, "Managed and unmanaged solutions exist at different levels within a Microsoft Power Platform environment."
- Unmanaged layer: All imported unmanaged solutions and unmanaged customizations exist at this layer. The unmanaged layer is a single layer.
- Managed layers: All imported managed solutions and the system solution exist at this level. When multiple managed solutions are installed, the last one installed is above the managed solution installed previously.
When you customize a managed solution in the Power platform solution, an unmanaged layer is created for your customizations. For example, if you have deployed Power Automate flows as part of a solution in your production environment and have some issues with your flow, you can edit and update your flow where it is failing. When you save changes, a new layer is added to your solution.
To see all the layers added to your managed solution, select the flow, and go to Advanced -> See solution layers context menu. This will open the Solution Layers page.
The solution Layers page will show you the original managed solution layer and any other modifications as the Unmanaged layer. The Layer Status field will show you which solution layer is currently active.
It is not recommended to modify the components of managed solutions. Normally when you edit any managed solution and deploy another version of the same solution then, it may cause issues to reflect the latest version deployment changes into your solution. So, it is always good to make changes in your unmanaged solution in the development environment and migrate those changes to your production environment as part of the managed solution package.
Remove the Unmanaged layer from a managed solution
If you or someone in the development team has added any unmanaged layer in a managed solution, you can remove this layer before deploying the latest version of the solution. For this again, you can select the flow and go to Advanced -> See solution layers context menu. This will open the Solution Layers page.
In the Solution Layers page, select the Unmanaged layer and click the 'Remove active customizations' button.
You will see the message for Delete unmanaged layer. Deleting this layer will delete all unmanaged customizations for Your Flow and revert to the managed state. Once you click on the Delete button, it will remove the unmanaged layer from the solution. Now you can deploy the latest version of your managed solution in the production environment.
Summary
In this article, I discussed the Power Platform solution layer and how we can add and remove unmanaged layers/ customizations to managed solution components in the Power Platform solution.