The Power Apps Solution checker is a useful tool from Microsoft that checks Power Apps solutions for issues and recommend best practices. These issues include problems with JavaScript, HTML, Plugins, and custom workflow activities. This tool can be especially useful when you are migrating your customizations from the legacy web client to the new Unified Interface client.
From the Microsoft description: “PowerApps Checker promotes higher-quality model-driven apps by helping app makers follow best practices when they customize and extend the PowerApps platform. PowerApps Checker performs a static analysis of your PowerApps solutions to identify performance and stability risks, and provides detailed recommendations to remove these risks from your solutions.”
Let’s go through an example of how to use this tool.
We have some simple JavaScript web resource that loads when the Account form loads. We can see the JavaScript uses Xrm.Page to get and set attribute values on the account form:
This JS sits inside a Solution called Carl’s Customizations. In the Power Apps maker at https://make.powerapps.com/ we can run the Solution checker to see if this solution contains any issues.
To do this, select the solution and click Solution Checker->Run. If you don’t have this option, you may see a Solution Checker->Install link:
Once run, in the top right you will see “Solution checker running”:
There are different statuses for when the tool is running or complete, including:
- Hasn’t been run
- Running
- Couldn’t be completed
- Results as of
- Couldn’t be completed, result as of
- Checked by Microsoft
- Checked by Publisher
In this case, the tool has run successfully, and we see in the Solution Check column, there are results that can be downloaded:
We also get a notification, which tells us we can get the results by downloading it or through an email:
Let’s click on View Results:
We see some feedback has been provided regarding our JavaScript file:
Selecting a row gives us more details. For example, below we see “‘Xrm.Page’ references or accesses a deprecated API in the client context object model. Replace this call with the following client context API: ‘ExecutionContext.getFormContext'”:
And clicking on the link Get the complete guide takes us to a help page:
If we select Download Results, we get a ZIP file:
With CSV/XSLX files:
And a results tab:
With the email we receive, there is a link to the Solutions page to download the results. The email alert can be useful if the solution checker is taking some time to run:
Let’s go and fix this error to see what happens.
We will set the formContext:
var formContext = executionContext.getFormContext();
And use this to set the variable:
var accountName = formContext.getAttribute(“name”);
Rerunning this, 2 issues have been removed and we have 1 remaining:
A useful tool to help you keep your code using best practices.
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET'S KEEP LEARNING TOGETHER.
CARL
Nice post, i’m using solution checker, if it has a version for Linux then it will very perfect to me 😀
Hi,
Any way to launch Solution Checker (in the cloud) automatically ?
For example using an API call ?
Thanks for advance.
Jean-Pierre