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:
- Workflow activities
- Configurations, such as SDK message steps
Here is list of rules, which are used in analysis:
|Solution component||Rule name||Rule description|
|Plug-in or workflow activity||il-specify-column||Avoid selecting all columns via Dynamics 365 for Customer Engagement query APIs.|
|Plug-in or workflow activity||meta-remove-dup-reg||Avoid duplicate Dynamics 365 for Customer Engagement plug-in registrations.|
|Plug-in or workflow activity||il-turn-off-keepalive||Set KeepAlive to false when interacting with external hosts in a Dynamics 365 for Customer Engagement plug-in.|
|Plug-in or workflow activity||il-avoid-unpub-metadata||Avoid retrieving unpublished Dynamics 365 for Customer Engagement metadata.|
|Plug-in or workflow activity||il-avoid-batch-plugin||Avoid using batch request types in Dynamics 365 Customer Engagement plug-ins and workflow activities.|
|Plug-in or workflow activity||meta-avoid-reg-no-attribute||Include filtering attributes with Dynamics 365 for Customer Engagement plug-in registrations.|
|Plug-in or workflow activity||meta-avoid-reg-retrieve||Use caution with Dynamics 365 for Customer Engagement plug-ins registered for Retrieve and RetrieveMultiple messages.|
|Plug-in or workflow activity||meta-remove-inactive||Remove inactive configurations in Dynamics 365 for Customer Engagement.|
|Plug-in or workflow activity||il-meta-avoid-crm2011-depr-message||Don’t use Microsoft Dynamics CRM 2011 deprecated messages.|
|Plug-in or workflow activity||meta-avoid-crm4-event||Don’t use Microsoft Dynamics CRM 4.0 plug-in registration stage.|
|Plug-in or workflow activity||il-avoid-specialized-update-ops||Don’t use specialized update operation requests in Dynamics 365 for Customer Engagement.|
|Plug-in or workflow activity||il-use-autonumber-feature||Use the auto-number feature instead of a custom auto-numbering solution.|
|Plug-in or workflow activity||il-avoid-parallel-plugin||The usage of parallel patterns should be avoided within plug-ins.|
|Plug-in or workflow activity||il-avoid-lock-plugin||Avoid lock of static members in plug-ins.|
|Plug-in or workflow activity||meta-avoid-retrievemultiple-annotation||Avoid registering a plugin on RetrieveMultiple of annotation.|
|Web Resources||web-use-async||Interact with HTTP and HTTPS resources asynchronously.|
|Web Resources||meta-remove-invalid-form-handler||Correct or remove invalid Dynamics 365 for Customer Engagement form event registrations.|
|Web Resources||meta-remove-orphaned-form-element||Correct or remove orphaned Dynamics 365 for Customer Engagement form event registrations.|
|Web Resources||web-avoid-modals||Avoid using modal dialogs.|
|Web Resources||web-avoid-crm2011-service-odata||Don’t target the Microsoft Dynamics CRM 2011 OData 2.0 endpoint.|
|Web Resources||web-avoid-crm2011-service-soap||Don’t target the Microsoft Dynamics CRM 2011 SOAP services.|
|Web Resources||web-avoid-browser-specific-api||Don’t use Internet Explorer legacy APIs or browser plug-ins.|
|Web Resources||web-avoid-2011-api||Don’t use the deprecated Microsoft Dynamics CRM 2011 object model.|
|Web Resources||web-use-relative-uri||Don’t use absolute Common Data Service endpoint URLs.|
|Web Resources||web-use-client-context||Use client contexts.|
|Web Resources||web-use-dialog-api-param||Use dialog API parameters.|
|Web Resources||web-use-org-setting||Use organization settings.|
|Web Resources||web-use-grid-api||Use the grid APIs.|
|Web Resources||web-avoid-isActivityType||Replace Xrm.Utility.isActivityType method with new Xrm.Utility.getEntityMetadata and don’t use in ribbon rules.|
|Web Resources||meta-avoid-silverlight||Silverlight web resource usage is deprecated.|
|Web Resources||web-remove-debug-script||Avoid including debug script in non-development environments.|
|Web Resources||web-use-strict-mode||Use strict mode when possible.|
|Web Resources||web-use-strict-equality-operators||Use strict equality operators.|
|Web Resources||web-avoid-eval||Don’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
7 thoughts on “CDS Solution Checker What Why When How”
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
Lead engineer on PowerApps checker
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.
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!
Thank you so much my friend for commenting and sharing your valuable feedback. This is highly valuable to me.
I liked your idea of running solution checker regularly. It will reduce code review efforts for our team.
Thank you for feedback, I am glad you like this.