Solution Checker Best Practices

Loading


As the use of Microsoft Power Platform, particularly Power Apps and Dynamics 365, continues to grow, so does the importance of maintaining high-quality, efficient, and secure solutions. Enter the Solution Checker—a powerful tool in the Power Platform toolbox designed to help developers and citizen makers identify potential issues in their solutions before they become real problems.

Solution Checker analyzes customizations in your solutions—such as plug-ins, custom workflows, JavaScript, and more—and provides actionable insights to improve performance, maintainability, and security.

But simply running Solution Checker is not enough. To get the most value, teams should follow best practices for how and when to use it, how to interpret results, and how to integrate it into their development lifecycle.

This article will explore the ins and outs of Solution Checker, its benefits, common issues it flags, and best practices for incorporating it into your app lifecycle.


1. What is Solution Checker?

Solution Checker is a static analysis tool provided by Microsoft that scans unmanaged or managed solutions within Microsoft Dataverse (Common Data Service). It reviews custom components—like JavaScript, plug-ins, workflows, and form customizations—and provides recommendations based on Microsoft’s design guidelines and best practices.

Solution Checker can be run:

  • Directly from Power Apps Maker Portal
  • Via Power Platform CLI (pac tool)
  • Automatically through Azure DevOps pipelines
  • Inside GitHub Actions using Power Platform build tools

2. Why Use Solution Checker?

Solution Checker is not just a “nice-to-have”—it’s essential for professional development within the Power Platform. Here’s why:

a. Catch Issues Early

It helps detect common problems early in the development cycle—saving time, cost, and potential production issues.

b. Improve Performance

Suggestions often highlight inefficient code or data operations that can be optimized to enhance app speed and responsiveness.

c. Ensure Best Practices

It enforces consistency and adherence to Microsoft’s recommended development patterns.

d. Secure Customizations

Flags potential security vulnerabilities in your custom code and design.

e. Accelerate ALM (Application Lifecycle Management)

Solution Checker integrates with DevOps pipelines, enabling automated quality checks before code is deployed.


3. What Does Solution Checker Analyze?

Solution Checker reviews a wide variety of custom components, including:

  • Client-side scripts (JavaScript)
  • Plug-ins (C# assemblies)
  • Custom workflows and actions
  • Web resources
  • Form customizations

Some of the issues it flags include:

  • Inefficient loops or large fetches in plug-ins
  • Improper use of Xrm.Page (deprecated)
  • Synchronous server-side code that should be async
  • Long-running operations
  • Missing exception handling
  • Overuse of synchronous client-side calls
  • Inefficient data access patterns (e.g., RetrieveAllEntities calls)

4. Running Solution Checker: Options and Tools

There are multiple ways to run Solution Checker depending on your role and workflow.

a. Power Apps Maker Portal

  1. Navigate to Solutions in Power Apps
  2. Select the solution you want to check
  3. Click Check Solution > Run Solution Checker
  4. Results appear in the portal, downloadable as Excel or viewable inline

b. Power Platform CLI (PAC CLI)

pac solution check --path "YourSolutionFolderPath"

This allows you to integrate checks into build scripts and CI/CD pipelines.

c. Azure DevOps Integration

Using Microsoft Power Platform Build Tools, you can include a Solution Checker task in your pipeline:

- task: PowerPlatformChecker@0
  inputs:
    authenticationType: 'PowerPlatformSPN'
    PowerPlatformSPN: '<Service Connection Name>'
    solutionInputFile: '$(Build.ArtifactStagingDirectory)/yourSolution.zip'
    ruleSet: '0ad12346-e108-40b8-a956-9a8f95ea18c9'  # Default ruleset

d. GitHub Actions

You can run Solution Checker in GitHub workflows using Microsoft’s Power Platform Actions. This is ideal for cloud-native DevOps teams.


5. Best Practices for Using Solution Checker

To maximize the effectiveness of Solution Checker, consider the following best practices:

a. Run It Early and Often

Don’t wait until you’re about to deploy to run the checker. Make it part of your regular development routine—ideally at every significant check-in or before pull requests.

Tip: Include it in pre-merge CI pipelines to block problematic code before it reaches your main branch.


b. Fix Critical and High Issues Immediately

Solution Checker assigns severity levels to issues:

  • Critical: Must-fix before release (e.g., major performance or security issues)
  • High: Fix as soon as possible
  • Medium/Low: Consider fixing; often best handled in refactoring cycles

Prioritize critical and high-severity issues. Failing to do so could result in long-term technical debt or degraded performance in production.


c. Understand the Context of Findings

Not every rule applies equally to every scenario. Use Solution Checker’s detailed explanations to understand why something is flagged. Sometimes, you may have a valid business reason for deviating.

Example: If a long fetch XML query is flagged but is necessary for a report that runs off-hours, it might be acceptable—with proper documentation.


d. Avoid Code Smells in JavaScript and Plugins

The most common findings relate to:

  • Unused variables
  • Synchronous XHR calls
  • Deprecated APIs like Xrm.Page
  • Inefficient DOM manipulation
  • Poor error handling in plug-ins

Refactor such issues into modular, efficient code. Follow modern JavaScript and C# development principles.


e. Maintain a Clean, Modular Solution Architecture

Solution Checker is more effective when solutions are well-structured. Follow best practices like:

  • Use solution layering (base + feature + config)
  • Group components logically (e.g., Forms, Views, JS in folders)
  • Use prefixes and naming conventions for clarity
  • Separate code by function and purpose

Tip: Keep custom code to a minimum when possible—use low-code tools unless code is truly necessary.


f. Document Exceptions and Known Issues

Sometimes, issues flagged by Solution Checker can’t be resolved due to legacy dependencies or external constraints. Document these exceptions clearly, so others (and your future self) know they’re acknowledged and intentional.


g. Integrate with ALM Pipelines

Embed Solution Checker into your DevOps pipelines to ensure every solution that gets deployed has passed a quality check. This brings automation and consistency across environments.

Tip: Use policy gates to block deployments that don’t meet your solution checker thresholds.


h. Stay Updated with New Rules

Microsoft frequently updates Solution Checker with new rules and patterns. Keep an eye on release notes or community updates to stay aligned with the latest best practices.


6. Team Collaboration and Governance

For organizations with multiple teams working on Power Platform:

a. Standardize Development Guidelines

Create internal documentation that reflects Solution Checker priorities. Define rules that must be fixed, guidelines that can be bypassed, and escalation procedures for exceptions.

b. Train Developers and Citizen Makers

Provide training or onboarding for both pro devs and makers on how to write clean code and how to use Solution Checker effectively.

c. Code Reviews with Solution Checker Reports

Include Solution Checker results in pull requests or code review meetings. This reinforces code quality and helps developers learn from findings.


7. Common Pitfalls to Avoid

PitfallSolution
Ignoring resultsPrioritize and act on findings
Only running it onceAutomate in CI/CD for every change
Fixing blindlyUnderstand each issue and its impact
Over-relying on toolCombine with peer code reviews
Lack of governanceCreate internal rules and documentation

8. Example Use Case: Solution Checker in DevOps

Imagine a Dynamics 365 team maintaining a customer engagement app. Their DevOps process includes:

  1. Developers commit code (JavaScript, plug-ins) to a Git repository.
  2. A CI pipeline exports the solution, runs Solution Checker, and blocks the build if critical issues are found.
  3. Solution Checker results are emailed to the dev team.
  4. Developers review and fix flagged issues before merging to main.
  5. A deployment pipeline ensures only validated solutions go to production.

This pipeline ensures quality, consistency, and compliance without adding manual steps to the developer workflow.



Leave a Reply

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