Skip to main content

Solution Checker

With everything moving to the Power Platform, Dynamics 365 has become much more than just a CRM platform.  Many of the tasks and objects that you had worked within Dynamics 365 in the past (such as entities, forms, views, global option sets, solutions, etc.) have become available on the PowerApps portal.  While you're still able to work with these features within D365, you can  also navigate to the PowerApps portal and work with them there as well.



As we're getting more comfortable living in this brave new world, there's more and more features we're finding.  One such feature is the Solution Checker, which you must first install before being able to use.  To install, navigate to Solutions, and at the top of the grid you'll see Solution checker.  Click on that, and then click on Install.



This will take you to a PowerApps Checker page, where you'll need to click on Free Trial and Continue to the terms of use and privacy settings.  You'll then be taken to another page to add the app to D365 where you need to again agree to the terms and privacy statement to continue.



You'll be redirected to the D365 Admin Center where you can see all the installed solutions, including the PowerApps Checker and the status of the install.  It should take about 30 minutes to install.



Once the install is complete, back in the Power Platform portal, you'll then be able to Select a Solution -> Click the ellipses -> Solution Checker -> Run.  You'll see a notification when Solution Checker is running at the top of the page, and in the Solution check column





When it's complete, you'll notice the status on the solution is updated, and you'll be able to download the results (they're exported to both CSV and XLSX format).




If your solution is fine, you'll be notified as such in the results.  Otherwise, they'll indicate what you need to look at and address.  Below are a couple examples of what the results file could look like.





There are a lot of rules that the Solution Check runs against, such as checking for Xrm.Page references in JavaScript and advising to update them to using getFormContext instead.

Another example is if you have an OnLoad event on a Form, but you have the wrong JavaScript file selected. The JavaScript will still work since the file selected is really just to establish a dependency, but it will call those out for you so you can go set up the proper dependencies.

Note that the Solution Checker actually ends up downloading a copy of the solution to Azure to run the checks against.  Therefore, there will be certain solutions you won't be able to run this against (such as Managed Solutions).  Also, if you are using Patch Solutions and have a patch currently cloned, the Solution Checker will not be able to scan the Base Solution - it can only scan the Patch Solution.

Comments

Popular posts from this blog

Announcing the New Dynamics 365 Toolbot Chrome Extension!

Today I am excited to announce the new Dynamics 365 Toolbot! This new Chrome Extension will allow you to perform commands that will help you with your development or administrative tasks. The extension can be found here - https://chrome.google.com/webstore/detail/dynamics-365-toolbot/kljiiminicfmdlplhejocopfmgmipach.

Note: Currently, due to the APIs being used, it only works on v9+.

First, navigate to the link above using Chrome and install the extension. Then, head to your Dynamics 365 environment and open a record. From there, click the little blue robot icon in the toolbar of Chrome which will pop open the Toolbot.



Click the text box and a list of commands will display. You can select or type any of the commands and hit Submit to execute them. Some commands require you to replace the default token with the desired request.


For example, select or type "display id" and click Submit and the Toolbot will display the current record's ID.



The majority of the commands should …

CRM 2011 LINQ - All Columns vs. Selected Columns

When creating LINQ queries in CRM 2011, it is easy enough to return the whole column set of the entity record without even thinking about the impact.  
Below is an example of querying all contacts from Chicago and returning all columns for each contact record.


This can be a big performance impact depending on the amount of columns that exist on the Contact entity and how many contact records exist in the system.  Another issue is that it could cause errors down the line if some of the attribute types are changed in the CRM system since the data is being bound to a model class that could be out-of-sync.
From the MSDN article on constructing LINQ queries (http://msdn.microsoft.com/en-us/library/gg328328.aspx), we can see that the select clause creates a column set:
The select clause defines the form of the data returned. The clause creates a column set based on the query expression results. You can also define an instance of a new object to work with. The newly created object using the…

CRM 2011 Form XML

Retrieving and parsing the Form XML in CRM 2011 is pretty easy.  If you ever had to do this in CRM 4.0 you would know that the Form XML was stored in the OrganizationUI table.  In CRM 2011 it is now stored in the SystemForm table.  
So first things first, we need to build a query to retrieve the Form XML for an entity from the SystemForm table.

In my case, I just have the entity's name so I need to retrieve the entity metadata and find it's type code to use to filter the query.  I also filter the SystemForm Type by 2 which means it is the Main form (http://msdn.microsoft.com/en-us/library/gg509016.aspx).
Now that we have my entity's Form XML.  We can build a method to find all the attributes' schema names that exist on the form.  This method just parses the XML string into an XElement and then selects all the id's of the "control" nodes that exist in the Form XML.  This array of id's will be all the schema names of the attributes that exist on the for…