Power Platform & Dynamics 365 Cloud Solution Architect Assets
Service Offerings Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Dataverse Code Review Guidance for Resilient Applications

Code Reviews are helpful to identify violations in customizations.

Organizations can run a code review called Solution Checker against their solutions. I recommend reviewing the last time Solution Checker was run. If its been a while or a recent code release was performed, run Solution Checker again. Ideally, Solution Checker is run on each commit or extraction from a development environment.

Recommendations

  • Enable Managed Environments for Dynamics 365 production environments.
  • Enable Solution Checker enforcement on test or build environments.
  • Track analysis results and assign work items for each.

Solution Checker Guidelines for Resiliency

RuleNotes
Avoid duplicate Dataverse plug-in registrationsCan create SQL deadlocking Query Link
Remove deactivated or disabled customizationsCarrying unneeded code can cause confusion and slow deployments
Interact with HTTP and HTTPS resources asynchronouslyBrowsers are moving away from sync calls
Avoid ModalsDeprecated
Avoid DOM FormNot supported
Avoid DOM Form EventsNot supported
Avoid CRM 2011 ODataDeprecated
Avoid CRM 2011 SOAPDeprecated
Avoid Browser Specific APIsIE or legacy browser functionality should be removed
Avoid Unpublished FunctionalityCan be flaky and cause code to break
Avoid window.topNot guaranteed to be correct DOM level
Use Relative URICan hard code incorrect url
Use Navigation APIDeprecated
Use Client ContextDeprecated
Use OfflineDeprecated
Do not make parent assumptionCan be flaky and cause code to break
Use Org SettingDeprecated
Use Global ContextDeprecated
Use Grid APIDeprecated
Use Utility DialogsDeprecated
Avoid IsActivityTypeDeprecated
Avoid SilverLightDeprecated
Use STRICT modeHelps with resiliency of JS
Use strict equality operatorsHelps with resiliency of JS
Avoid withDeprecated
Use App Side Pane APIDeprecated
Address HIGH formula issues with Canvas Apps
Avoid AutoStart in Canvas Apps

How to track for specific scans of a solution

Organizations can track the results of Solution Checker through Analysis Jobs. The list above is a great place to start to assess your production solutions resiliency.

//Check analysis jobs within a specific environment

https://[org].crm.dynamics.com/api/data/v9.1/msdyn_analysisjobs

//Check analysis results within a specific environment

https://[org].crm.dynamics.com/api/data/v9.1/msdyn_analysisresults

//Check Results for a specific solution name (analysis component)

https://[org].crm.dynamics.com/api/data/v9.1/msdyn_analysisresults?$filter=msdyn_AnalysisComponentId/msdyn_componentname eq '<solutionName>'