{Know} Layering Solutions in Power Apps

Sending
User Review
0 (0 votes)

Hello Everyone,

Today i am going to share Solution Layers in Power Apps.
Lets gets started.
Unmanaged and Managed Soltions exist at different layers within a Microsoft Dataverse Environment. Solution Layering is at component level.
Two types of layers:

  • Unmanaged Layer: As we know all new solution developments start at unmanaged solution and on and off customizations exist at this layer. All unmanaged solutions share a single unmanaged layer.

                                                                        Component

  • Managed Layer: All imported, managed solutions and all system solution exist at this level. if multiple managed solutions installed, the last one installed is above the managed solution installed previously. if two managed solutions have conflicting definitions, the runtime behavior is either “Last one wins” or a merge logic is implemented.

    Note: If managed solution is uninstalled, the managed solution below it takes effect. if you uninstall all unmanged solutions. The default behavoir defined within the system solution is applied.
At the base of the managed layers level is the system layer. The system layer contains the entities and components that are required for the platform to function.

Managed Solution Layering:

There are layers within a solution for each managed component. depending on whether one or more patches or a pending upgrade to the solution has been imported  can include these layers:
Base : Located at the bottom of the solution layer “stack” is the base layer. this layer includes solution publisher, which identifies the owner of the component and the managed properties associated with it.
Top: is considered as current layer and defines the runtime behavoir of the component. The top layer can be an upgrade or a patch, or if no patches or upgrades have been applied to the solution determines the component runtime behavior.
Layers added from upgrade:
1. Pacthes: If the component  has one or more solution patches imported, they’re stacked on top of the base layer, with the most recent patch residing above the previous patch.
2. Pending upgrade: if a staged upgrade(named -Upgrade) is imported, it resides on top of the base and patch(if any) layers.
Note: Using patches isn’t recommended. More information click here

Merge behavior: Merge solution when a solution is updated or when multiple solutions are installed that effect the same component. 

Only Model driven apps, forms, site maps are merged, all other components use TOP LEVEL WINS Behavior.

Top wins behavior: All other components use a top wins behavior where the layer that resides at the top determines how the components work at app runtime. A top layer can be introduced by a staged(pending) upgrade.
Top layer introduced by a pending upgrade:
1. The current top(base) layer has the Max length property of Comments text column for the account table using the default setting of 100.

2. A solution upgrade is imported using the stage for upgrade option, which creates a new top layer. The pending upgrade includes the Comments text column for the account table with MAX LENGTH property value chnaged to 150.

So Comments column for account records will allow up to maximum of 150 characters during app run time.
Solution update and upgrade merge behavior are stacked on top of the base solution. These can be merged by selecting Apply upgrade from the Solution area in Power Apps, which flattens the layers and creates a new base solution.
Multiple solutions merge behavior: when you prepare to distribute your managed solution, the target environement may have multiple solutions installed or that other solutions might be installed in the future.
Construct a solution that follows best practices so that your solution won’t interfere with other solutions.
According to Microsoft docs: regarding the multiple solution merge that although every effort is made to preserve the presentation, some incompatibilities between customizations might require that the computed resolution change some presentation details in favor of maintaining the customization functionality.
I hope this helps
Malla reddy(@UK365GUY)
#365Blogpostsin365Days