Solutions in Power Platform

In this exercise, we will learn about the solution, its types (managed and unmanaged) and how we can import and export the solutions. And, how solutions are used for implementing ALM in Power Apps and Power Automate.

Important points about solutions:

A solution can be managed or unmanaged.
1. Unmanaged solutions Unmanaged solutions are generally part of the development environment to make the changes in the components of the solutions.

Important points about Unmanaged solutions:

2. Managed solutions Managed solutions are deployed to any environment that isn't a development environment for that solution. For example: Production environment.

Important points about Managed solutions:

Create a Solution

Our first task is to create a solution:

Step 1: To create a solution, sign in to Power Apps and then select Solutions, which is available in the left vertical navigation.

Note: We have the flexibility to create a solution in both Power Apps and Power Automate. From either service, we can access all services to add to our solution.

Solutions in Power Platform

Step 2: Select + New solution.
In the New solution dialog box. Add the Display name, select CDS Default Publisher, and then enter a Description. Select Create.

Solutions in Power Platform

We also have the option to create a new publisher by clicking on the + New publisher.

a) Enter the Display name, Name, Prefix, and then select Save.

Solutions in Power Platform

b) Select the dropdown to choose the publisher that we created, select Publisher, and then select Create.

Solutions in Power Platform

Our Solution is created, and its available in our list of solutions.

Solutions in Power Platform

Step 3: We can now create new apps, flows, and tables into this solution or add existing ones. To add new apps, flows, and tables, select the solution “My First Solution”, and then select + New in the upper-left corner of the screen, and then select what we are going to create in the solution.

Solutions in Power Platform

We can add an app (Canvas app, Model-driven app), Cloud flows, Table, Choice, etc.

Step 4: To add existing apps, flows, and tables, select Add existing. Select App to add existing apps, Table to add existing tables, and Automation to add existing flows.

Solutions in Power Platform

Let’s add a flow to the solution, Select Add existing and then select Automation >Cloud flow.

Solutions in Power Platform

a) Select the Outside Dataverse tab.

Solutions in Power Platform

b) Select the Sharepoint-selected item cloud flow that we have created in our environment and then select Add.

The flow is added in the solution.

Solutions in Power Platform

Note: Canvas apps can use existing instant cloud flows that exist within the solution. Canvas apps created within a solution cannot reference any Power Automate flows that are outside of the solution. Canvas apps can only use or trigger instant cloud flows. Business process flows cannot be used within canvas apps.

Step 5: To add the existing table. Select Add existing and then select Table.

Solutions in Power Platform

By default, only 100 items are loaded. We can click on “Load the next 100 items”.

Solutions in Power Platform

Select the table, and click on Next.

On the following screen, we can choose the objects of the entity which we want to select.

Solutions in Power Platform

Click on Select objects. On the following screen we can select the object, then click on Add.

Solutions in Power Platform

We can see that the table is added to the solution.

Solutions in Power Platform

Step 6: We can also edit the solution components.

To edit the component, select the component, and then select Edit, which is available in the upper portion of the screen, or we can select the ellipsis, and then select Edit.

Step 7: We can remove any component from the solution itself. Select the component, and then click on three dots (…) then Remove. We have two options:
a) Remove from this solution: It remove the component from the existing solution only.
b) Remove from this environment: It remove the component from the current environment.

Solutions in Power Platform

Import and export solutions

Let we have a solution and within it we have solution components (e.g., app, table, flow). Now, we want to export this solution from one environment to the other environment in the same tenant or an environment in a new tenant.

Step 1: In the source tenant, sign in to Power Apps and then select Solutions, which is available in the left vertical navigation.

Step 2: Select the solution which we want to export from the Solutions list and then select Export solution.

Solutions in Power Platform

Step 3: Select Publish. This selection will make sure that all changes that are made to this solution are part of this published solution.

Solutions in Power Platform

After the solution get published, click on Next.

Solutions in Power Platform

Step 4: Now, we need to decide which environment that this solution will be exported to. If it's a test or a production environment, then select Managed (recommended). If we are moving it to another development environment, select Unmanaged and then select Export.

Solutions in Power Platform

In the upper left of the screen, we should see a message stating that the solution is currently exporting.

Solutions in Power Platform

Step 5: After exporting the solution completed, we should see a message that the solution is exported successfully and a download button is present.

Solutions in Power Platform

By clicking on the Download button, a zipped file will be downloaded to our default download location.

The zipped file name contains the solution name, if it's managed or unmanaged, and the version number.

Solutions in Power Platform

Step 6: To deploy a solution to another environment, we will import an exported solution file. We can import the managed or unmanaged solution file.

Go to the destination tenant, sign in to Power Apps, and then select Solutions, which is available in the left vertical navigation. Select Import solution.

Solutions in Power Platform

Step 7: In the Import a solution pane, select the zipped file that was exported, and then select Next.

Note: Do not unzip the file. Upload the zip file.

Solutions in Power Platform

Step 8: On the next screen we ca our name of the solution and its other details as shown in the image below.

Solutions in Power Platform

After clicking on Import the importing started in the other environment.

Solutions in Power Platform

After importing it shows in the Managed tab, because we import the Managed solution.

Solutions in Power Platform

Managed properties

We can use managed properties to control which of our managed solution components can be customized.

View and edit entity managed properties

Step 1: Sign in to Power Apps or Power Automate and select Solutions from the left pane.
Step 2: Open the solution that we want to configure.

Solutions in Power Platform

Step 3: From the list of components in the solution, select … next to the table that we want to view the managed properties, and then select Managed properties from the Advanced section.

Solutions in Power Platform

The managed properties page is displayed.

Solutions in Power Platform

Entities have more managed properties than any other type of solution component. If the entity is customizable, we can set the following options:

OptionDescription
Allow customizations Controls all the other options. If this option is False, none of the other settings apply. When it is True, we can specify the other customization options. When False, it is equivalent to setting all other options to false.
Display name can be modifiedWhether the entity display name can be modified.
Can Change Additional PropertiesApplies to anything not covered by other options.
New forms can be createdWhether new forms can be created for the entity.
New charts can be created Whether new charts can be created for the entity.
New views can be createdWhether new views can be created for the entity.
Can Change Hierarchical Relationship Whether Hierarchical Relationships settings can be changed.
Can Change Tracking Be Enabled Whether the entity Change Tracking property can be changed.
Can Enable sync to external search indexWhether the entity can be configured to enable Dataverse search.

Solution patches

Sometimes when we already exported our solution as the Managed in the Production environment. And if in when we some changes in the solution of the development solution in the unmanaged solution then we have two approaches.

First Approach: Delete the Managed solution from the production environment. Export the whole solution from the development environment and then import it in the production environment.

Second Approach: We can create a patch for a parent solution and export it as a minor update to the base solution.

Important points about solution patches

Create a solution patch We can create a solution by following the below steps:

Step 1: Go to the Power Apps, and then select Solutions.

Step 2: In the solutions list, select an unmanaged solution to create a patch for. On the command bar, select Clone, and then select Clone a Patch.

Solutions in Power Platform

Step 3: When we clone a patch, the version number we specify includes the build and revision positions.

Note: Power Platform solution versions are in the format <major>.<minor>.<build>.<revision>.

Solutions in Power Platform

Step 4: Update the version numbers and click on Save.

Solutions in Power Platform

Step 5: In the solutions list, find the newly created patch. Notice that the unique name of the solution has been appended with Patchhexnumber.

Solutions in Power Platform

Open the newly created solution patch. We can see that the patch is empty. We just need to add the only components in those we have changed somethings.

Solutions in Power Platform

The addition process is just like with the base solution, add the components and assets we want.

After add click on the three dots and then click on Advanced and then + Add required object, to add any missing object that are used by the components in the solution.

Solutions in Power Platform

In the Add Required Objects dialog box click on Ok.

Solutions in Power Platform

After adding the solution looks like the image below.

Solutions in Power Platform

Then export the solution by clicking on the Export solution.

Solutions in Power Platform

Export the solution as the Managed. And click on Export.

Solutions in Power Platform

A zip file is downloaded, now go back to the product environment, and then select Import solution.

Solutions in Power Platform

Browse the zipped file and then select Next.

Solutions in Power Platform

After successfully importing, we can see our two Managed solutions.

Solutions in Power Platform

In the development environment, after we have created the first patch for a parent solution, the solution becomes locked, and you can’t make any changes in this solution or export it. However, if we delete all of its child patches, the parent solution becomes unlocked.

Solutions in Power Platform

We must merge both solutions (Patch ==> Parent Solution). To merge the patch into the parent solution, select the parent solution. Then click on three dots (…), then select Clone solution.

Solutions in Power Platform

Please note in the Clone to solution dialog box, we can see the message, "Create a new version for the selected unmanaged solution. Any patches that have been created will be rolled up into the newly created solution."

And the version number (major) is automatically updated to the next one. This time we are able to update the major and minor positions of the version number.

Solutions in Power Platform

After the successful Clone operation, we are not able to see our patches anymore, as they are merged into our base or parent solution as shown in the image below.

Solutions in Power Platform

We can add, edit, or delete components and assets in the cloned solution.