How to Run and Use the Power Apps Solution Checker

Leave a comment

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. 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.

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *