In our previous post, we looked at Power Platform environments and their relevance to our wider builds. With those created, we can now look at the next level down – understanding and creating solutions.
Table of Contents
ToggleWhat are they?
Power Platform solutions are how we bundle up various components so we can transport them from one environment to another. A common scenario is to develop a solution, move it to a new environment for testing, then move again to our Production environment when ready.
For those new to Power Platform solutions, think of solutions like a digital rucksack; you throw loads of stuff in it, zip it up then take it somewhere else. A typical solution could have allsorts of interconnected assets; apps, flows, tables, variables, security roles, so it’s an important best practice to use solutions to keep all the related components together.
It’s worth noting early doors that Power Platform solutions are not a premium feature. Components within the solution might be (such as a flow using a Premium connector), but to create a solution you simply need an environment with a provisioned Dataverse database.
Solution types
There are two types of solutions:
Unmanaged:Â this solution type allows you to edit all the artefacts within the solution. As a rule, any ongoing work to your solution is done in a Development environment therefore you’ll be using an Unmanaged type, giving you the full editing freedom. You can export an unmanaged solution as an unmanaged, or managed solution.
Managed:Â this solution type does not allow edits to be made to any solution components. You can bypass this logic to edit them in different ways, but it can create a bit of a mess that needs tidying up. Think of it like this – trying to edit a managed solution is like steering a car with your knees; it’s doable, but doesn’t mean to say it’s a good idea! You can’t export a managed solution.
Typically, we’d export our unmanaged solution from Development as a Managed solution. Then, we’d import that Managed solution into Test/UAT, then Production thereafter.
Solution publisher
A solution publisher is a way of categorising your solution. You must specify a publisher when creating a solution, either selecting one of the default options or creating your own. In my experience, always create your own rather than using any of the defaults, as it helps to prefix relevant components to avoid conflicts when importing into other environments.
Creating a solution
1) login to https://make.powerapps.com and select your relevant environment via the top right of the screen:
2) From the left-hand menu, select ‘Solutions’
3) Click on ‘+ New Solution’
4) Give your solution a meaningful Display Name. The name field will populate automatically, you can edit this if you want to. Either select an existing Publisher or create a new one
In this example, I’ll select ‘+ New publisher’ and create a new one. The ‘Prefix’ option is important here, as any components added to this solution will have this prefix. Once completed, click ‘Save’ to create the new Publisher
The new Publisher can then be selected back in the ‘New solution’ form
5) Version number is defaulted to 1.0.0.0. This is the standard pattern representing different parts of the build, being [Major]-[Minor]-[Build]-[Revision]. The ‘Revision’ number is incremented by 1 every time we export the solution. I’ve worked with several high-profile clients who’ve all had their own unique standards on version numbers. Make sure you check internally for anything similar before committing to the version number sequence for your solution.
6) The ‘Package type’ will default to ‘Unmanaged’ and can’t be changed at this point. Click ‘Create’ to create your solution!
Adding assets to your solution
With a solution created, you can now add things to it. There’s an extensive list of options available when clicking on ‘+ New’ inside your solution.
This is what we’ll be doing over the next few blogs, adding the tables, flows, environment variables and an app needed for my wife’s business solution.
What if I already created things in my environment before I created my solution?
Fear not, young padawan. Next to that ‘+ New’ button we have ‘Add existing’, which yields the same experience for you to add what you need to.
Things I wish I knew when I started out
It took me a while into my Power Platform career to use solutions. Back in the very early days, there was a restriction on the number of environments you could provision, so couldn’t really perform ALM. Plus, at the time I was working mainly on apps with a SharePoint list backend. We can now solutionize these SharePoint references, but you couldn’t in the early days of Power Platform solutions.
There were a few things I learned on the job that are worth sharing for anyone new to solutions:
Use Solution Checker
We’ll cover export/import of solutions in a future blog post, but for now will at least mention to run Solution Checker before any exports. It’s even a good habit to run routinely anyway, to keep track of and fix any issues. To run it and/or view results, select the solution and pick the option from the top ribbon or find it in the ellipsis menu:
Exporting a solution doesn’t take data with it
That’s right, it only takes the structural changes. No data in your Dataverse tables will be exported and move with a solution package. Anyone here remember the good old days with MS Access? Similar export/imports you could choose to copy the structure only, or structure and content. I’d love to see something similar here.
I get it – you wouldn’t want your UAT data to accidently be moved into Production along with the rest of your solution. That said, personally I’d love to see some additional options we can play with here. Until then, we can manually export and import data with .csv files (laborious), or use either the Configuration Migration Tool or Pipelines (not very ‘Maker friendly’).
Your stuff is backed up automatically – but only if it’s in a solution!
As per Microsoft’s documentation on environment backups, please note the last point listed under ‘System backups’:
“Only Power Apps and Power Automate flows in a Dataverse solution participate in backup and restore operations“
If you’ve got any business critical apps, flows, bots or any other assets in your environment that aren’t in a solution, I recommend you remedy that one quite quickly. Just incase.
Piece by piece, we’re working towards our actual build for my wife’s business. We’ve started with gathering some requirements and provisioning our environments, in our Dev environment we now have our solution ready to go:
In my next few posts, we’ll cover setting up an environment variable and start fleshing out the bones of our canvas app. Stay tuned!