CDS Solution Checker What Why When How

Solution Checker

While delivering D365 projects, to address unique business requirements often we do customizations. The customizations can be simple or complex. A few times doing customizations can create performance and maintainability issues in solutions. Usually, teams follow some sort of best practices to avoid such risks. CDS solution checker is great Power Platform feature which can analyze customizations in a model-driven solution and report any potentials issues.

To use and run Solution checker we need to login to PowerApps, select the correct environment and target managed or unmanaged solution.

I remember before solution checker in a project we used SonarQube (open source) to ensure code quality but the real benefit of using Solution checker is that we don’t need to configure it or define rules, it uses Microsoft best practices to analyze the following components and customizations:

  • Plugins
  • Workflow activities
  • Web resources (HTML and JavaScript)
  • Configurations, such as SDK message steps

Here is list of rules, which are used in analysis:

Solution componentRule nameRule description
Plug-in or workflow activityil-specify-columnAvoid selecting all columns via Dynamics 365 for Customer Engagement query APIs.
Plug-in or workflow activitymeta-remove-dup-regAvoid duplicate Dynamics 365 for Customer Engagement plug-in registrations.
Plug-in or workflow activityil-turn-off-keepaliveSet KeepAlive to false when interacting with external hosts in a Dynamics 365 for Customer Engagement plug-in.
Plug-in or workflow activityil-avoid-unpub-metadataAvoid retrieving unpublished Dynamics 365 for Customer Engagement metadata.
Plug-in or workflow activityil-avoid-batch-pluginAvoid using batch request types in Dynamics 365 Customer Engagement plug-ins and workflow activities.
Plug-in or workflow activitymeta-avoid-reg-no-attributeInclude filtering attributes with Dynamics 365 for Customer Engagement plug-in registrations.
Plug-in or workflow activitymeta-avoid-reg-retrieveUse caution with Dynamics 365 for Customer Engagement plug-ins registered for Retrieve and RetrieveMultiple messages.
Plug-in or workflow activitymeta-remove-inactiveRemove inactive configurations in Dynamics 365 for Customer Engagement.
Plug-in or workflow activityil-meta-avoid-crm2011-depr-messageDon’t use Microsoft Dynamics CRM 2011 deprecated messages.
Plug-in or workflow activitymeta-avoid-crm4-eventDon’t use Microsoft Dynamics CRM 4.0 plug-in registration stage.
Plug-in or workflow activityil-avoid-specialized-update-opsDon’t use specialized update operation requests in Dynamics 365 for Customer Engagement.
Plug-in or workflow activityil-use-autonumber-featureUse the auto-number feature instead of a custom auto-numbering solution.
Plug-in or workflow activityil-avoid-parallel-pluginThe usage of parallel patterns should be avoided within plug-ins.
Plug-in or workflow activityil-avoid-lock-pluginAvoid lock of static members in plug-ins.
Plug-in or workflow activitymeta-avoid-retrievemultiple-annotationAvoid registering a plugin on RetrieveMultiple of annotation.
Web Resourcesweb-use-asyncInteract with HTTP and HTTPS resources asynchronously.
Web Resourcesmeta-remove-invalid-form-handlerCorrect or remove invalid Dynamics 365 for Customer Engagement form event registrations.
Web Resourcesmeta-remove-orphaned-form-elementCorrect or remove orphaned Dynamics 365 for Customer Engagement form event registrations.
Web Resourcesweb-avoid-modalsAvoid using modal dialogs.
Web Resourcesweb-avoid-crm2011-service-odataDon’t target the Microsoft Dynamics CRM 2011 OData 2.0 endpoint.
Web Resourcesweb-avoid-crm2011-service-soapDon’t target the Microsoft Dynamics CRM 2011 SOAP services.
Web Resourcesweb-avoid-browser-specific-apiDon’t use Internet Explorer legacy APIs or browser plug-ins.
Web Resourcesweb-avoid-2011-apiDon’t use the deprecated Microsoft Dynamics CRM 2011 object model.
Web Resourcesweb-use-relative-uriDon’t use absolute Common Data Service endpoint URLs.
Web Resourcesweb-use-client-contextUse client contexts.
Web Resourcesweb-use-dialog-api-paramUse dialog API parameters.
Web Resourcesweb-use-org-settingUse organization settings.
Web Resourcesweb-use-grid-apiUse the grid APIs.
Web Resourcesweb-avoid-isActivityTypeReplace Xrm.Utility.isActivityType method with new Xrm.Utility.getEntityMetadata and don’t use in ribbon rules.
Web Resourcesmeta-avoid-silverlightSilverlight web resource usage is deprecated.
Web Resourcesweb-remove-debug-scriptAvoid including debug script in non-development environments.
Web Resourcesweb-use-strict-modeUse strict mode when possible.
Web Resourcesweb-use-strict-equality-operatorsUse strict equality operators.
Web Resourcesweb-avoid-evalDon’t use the ‘eval’ function or its functional equivalents.

After running solution checker we can views results or can download results as an excel sheet with detail analysis. It is a good idea to run solution checker regularly, making it part of the definition of done in the scrum teams, or automating this service into release and build pipeline.

Feedback for Improvements

Solution checker is really a great feature to mitigate potential risks due to customizations in projects, but the following features can further improve this service:

  • Capability to add custom rules (it can be through custom code or regular expressions)
  • Ignore list, ability to skip few customizations or files from analysis
  • Directly sending (email) reports to the team or relevant people

I hope you will find this helpful. Please feel free and share this post, leave your feedback and suggestions.

Thanks, enjoy your day.

#D365 #D365CE #MSDynamics #PowerApps #PowerPlatfomr

Let’s Connect 🙂

twIconlnIconfbicon

 

7 Comments

  1. Hey, thanks for the blog. Here are some responses to your suggestions:
    1) Capability to add custom rules
    We have thought about this, however, instead are working to move the experiences closer to CICD, build, deployment, and development time, which will allow you incorporate PowerApps checker in with your other tools and process. We are still considering this as well.
    2) Ignore list, ability to skip few customizations or files from analysis
    This is available today with the PowerShell module
    3) Directly sending (email) reports to the team or relevant people
    Something to consider
    Thanks,
    Mike Huguet
    Lead engineer on PowerApps checker

    1. Hey Mike,

      Thank you for listening feedback, Solution checker is a great service and you guys have done an amazing job. Keep it up and I will keep sharing my ideas/ feedback for improvements.

      Cheers,
      Yawer

  2. Hi Yawer,
    Great post! I tried to use Solution Checker a couple of times, but now when I can see a list of rules that are used for analysis it will make my usage of Solution Checker much more efficient. Thanks for sharing!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s