Article written by David Ghesquière, PowerPlatform & M365 consultant in Qim info.
If you are a Power Platform developer, you have probably already said to yourself: “There must be another way to move my application from one tenant to another?”
If this is the case, you’re right, there is another method, and it is called Solutions.
What is a Solution?
A solution is used to move Power Apps, Power Automate flows, and Dataverse tables from one environment to another and from one tenant to another. The solution will enable the implementation of several concepts, the first of which is explained below.
Solution Types
Microsoft offers two types of solutions:
- Unmanaged solutions
- Managed solutions
What is an unmanaged Solutions?
It’s straightforward; this type of solution is mainly used during the development phase and, therefore, in a development environment. This makes it possible to enable all modifications to the elements, called Components, included in the solution.
When development is complete, the unmanaged solution can then be exported as unmanaged or managed.
It’s important to note that if you export an unmanaged solution as a managed solution, you will not be able to import it into the same environment.
Does that means managed Solutions are the opposite?
Yes, in a way, these are rolled out in a production or test environment. The components of a managed solution cannot be modified.
Therefore, a managed solution for roll-out protects your application from changes. In other words, this type of solution cannot be exported once installed in an environment.
In short, developers use an unmanaged solution when they work in a development environment. When the application is ready for roll-out, they export it as a managed solution for installation in a test or production environment.
Solutions offer us another concept mentioned briefly here: Solution Components.
Solution Components
As mentioned earlier, a component is an element of a solution. Simply put, anything that can be included in a solution is a component and is customisable.
The most common components are the following:
- Power Apps can be a model-driven, Canvas application.
- Power Automate flow can be an automatic, instant, or scheduled flow.
- The Dataverse table,
- Connection reference; for example, this component enables the creation of a connection to a service, for instance, Sharepoint, with a specific account that can be used on all your solution’s feeds.
- As an environment variable, this component is mainly used in Power Apps. It defines a value such as a Sharepoint site or Sharepoint List and easily reuses these values via the environment variable in Power Apps and Power Automate actions.
Below is the interface to modify (identical to the one for creating) environment variables.
Note that here the variable shpSite is used in shpUserList as the site source.
Now that our solution has its components, we need to roll it out into a dedicated environment. We will now explore a final concept which is the Solution Lifecycle.
Solution Lifecycle
The tools provided with the solutions enable the management of various application lifecycle processes to roll out or update our solution in the given environment.
Below are the different actions possible:
- To create or import unmanaged solutions, simply go to the chosen environment, select the Solutions tab and choose New Solution or Import Solution.
- To create updates for a solution. This type of action is useful during a major application update. It is important to note that removing components during the upgrade is impossible.
- If you need to remove unnecessary elements, you can import the solution as an upgrade to an existing managed solution. This will remove unused components and trigger an upgrade process. A new version of the solution will then be created.
- If slight modifications have been made to your application, such as changing a name or colour or fixing a minor bug, you can use the patch function. This will simply overlay the patch on the parent solution. Obviously, no components can be deleted via this function.
You now know in general terms how a solution works. This was, of course, an introduction to the subject, as it is vast and we cannot cover it all.
The teams of our Expertise Centre can assist you in your project’s roll-out and offer you a tailor-made implementation process. Don’t hesitate to get in touch with us!