Subcontracted Plugins and PCF Controls Arrive Without Tests and With Hard-Coded GUIDs

A written acceptance standard for Dataverse plugins, PCF controls and Business Central AL extensions, the pipeline checks that enforce it, how to review delivered code, and a scorecard for supplier quality.

Subcontracted plugins and PCF controls arrive without tests and with hard-coded GUIDs when nobody wrote down what "done" means. Publish an acceptance standard and enforce it in the pipeline. Business logic ships with unit tests that run on every build. Environment-specific values live in configuration, environment variables, configuration tables or alternate keys, never in constants. Every component is delivered inside a solution built from source control, never as a loose assembly or a manual import. Automated checks block the merge: build and tests, solution checker for Dataverse, ESLint for PCF, and the CodeCop, UICop and PerTenantExtensionCop analyzers for Business Central AL. Then track quality with a scorecard. This is how Solzet delivers its own work.

Why do subcontracted plugins and PCF controls arrive without tests and with hard-coded GUIDs?

Because the contract asked for a feature, not for a standard. A developer working against one development environment can see a team, a queue, a business unit or a currency record and paste its GUID into the code, and it works until the solution is imported into test, where the same record has a different ID. Tests are skipped for the same reason: nothing in the acceptance criteria asked for them, and on a fixed price they are the first thing to go.

The fix is not a stricter code review at the end. It is a written acceptance standard in the statement of work, the same for every supplier, and a pipeline that checks most of it automatically, so a review is about design rather than about finding constants.

What should the acceptance standard require of Dataverse plugins?

Write these into the statement of work as acceptance criteria. Each one is checkable.

  • Business logic separated from the IPlugin Execute method, so it can be unit tested without a live environment, with tests using a mocking framework or an in-memory context (FakeXrmEasy is one common choice) running in the build.
  • No hard-coded GUIDs, URLs, user names or record names: values come from environment variables, a configuration table, or a lookup by alternate key or unique name at run time.
  • No secrets in plugin configuration strings; secrets go to Azure Key Vault or a secure configuration referenced through an environment variable.
  • Tracing through ITracingService on failure paths, and error messages a user or administrator can act on.
  • Step registrations, images and filtering attributes held in the solution, with filtering attributes set so the plugin runs only when the fields it needs change.
  • Depth and recursion handled explicitly, and no retrieve of all columns.
  • Delivered in an unmanaged source solution in the repository and as a managed solution built by the pipeline.

What should the acceptance standard require of PCF controls?

A PCF control is TypeScript code with a manifest, and the same rules apply: logic that can be tested, configuration through bound properties rather than constants, and a packaged solution. In practice that means strict TypeScript and ESLint passing in the build, unit tests for the logic that formats, filters or validates data, no hard-coded entity names, field names, IDs or URLs where a manifest property or an environment variable can supply them, a version number raised in the manifest on every release, paging and record limits checked against realistic dataset sizes, keyboard and screen reader access, and the control shipped inside a solution. The development side, lifecycle and testing of controls in depth are covered on PCF controls development.

What code quality standard should a Business Central AL subcontractor meet?

For AL the tools already exist in the AL compiler. The standard is mostly about switching them on and refusing a merge when they fail.

  • Analyzers enabled in the workspace settings and the build: CodeCop for general AL style and correctness, UICop for the web client, PerTenantExtensionCop for per-tenant extensions, and AppSourceCop for apps going to Microsoft Marketplace (AppSource).
  • A ruleset file in the repository that states which rules are errors, which are warnings and which are suppressed, with a reason for each suppression.
  • A separate test app with test codeunits (Subtype = Test) covering the business logic the extension adds, run by the pipeline against a container or sandbox.
  • No hard-coded company names, number series, G/L accounts or codes: values come from setup tables the customer maintains.
  • Object ID range and prefix or suffix agreed in app.json and respected, permission sets for every new object, and events used instead of modifying standard behaviour where an event exists.
  • The build running in a pipeline such as AL-Go for GitHub or an equivalent Azure DevOps pipeline, producing the app file that is deployed, never a file compiled on a laptop.

Which automated checks belong in the pipeline?

The pipeline is what makes the standard real. Each check blocks the pull request when it fails, so nothing reaches a test environment that the standard would reject. How the solution commands compare with manual export and import is on PAC CLI against manual export and import, and deployment settings for environment variables and connection references on connection references and environment variables in ALM.

CheckApplies toToolBlocks the merge when
Build and unit testsPlugins, PCF, ALdotnet test, npm test, AL test runnerAny test fails or the build breaks
Static analysisPlugins and PCFRoslyn analyzers, ESLintErrors defined in the agreed rules appear
Solution checkerDataverse solutionsPower Platform Build Tools or PAC CLI solution checkIssues above the agreed severity are reported
AL analyzersBusiness Central extensionsCodeCop, UICop, PerTenantExtensionCop, AppSourceCopA rule set to error in the ruleset fails
Constant scanAll codeA simple pattern check for GUID literals and URLsA literal appears outside test code and approved lists
Solution build and deployDataverse and ALManaged solution or app built from source and deployed to test with deployment settingsImport or install fails in the test environment

How should a buyer review code delivered by a subcontractor?

Through pull requests into a repository the buyer owns, never by receiving a zip file. The reviewer works from a short checklist taken from the acceptance standard: design matches what was agreed, tests cover the business rules rather than just running, no constants, the solution or app version is raised, documentation for configuration and deployment is updated. Automated checks take care of style and most defects, so the human review is about design and maintainability. Reject the pull request, with a written reason, rather than fixing it yourself: otherwise the scorecard never shows the rework and the supplier never learns the standard. The onboarding checks before a subcontractor gets repository and environment access are on subcontractor onboarding.

Which scorecard KPIs measure a Dynamics 365 subcontractor’s delivery quality?

Measure a few things consistently, per supplier and per release, from data your own tools already hold. Set thresholds from your own baseline after the first few releases rather than from published benchmarks: what matters is the trend and the comparison between suppliers on similar work.

KPIHow to measure itWhat it tells you
First-pass pull request acceptancePull requests merged without a requested change, out of all submittedWhether the supplier works to the standard before review
Defects found in test per delivered itemDefects logged in system test against each user story or work itemBuild quality before users see it
Defects escaping to UAT and productionDefects found by users or after release, traced back to the itemHow much the supplier tests, and how much it costs you
Reopened defectsDefects closed as fixed and then reopenedWhether fixes address causes or symptoms
Rework effortHours spent correcting delivered items, by you or the supplierThe hidden cost a low headline figure can hide
Pipeline pass rateBuilds where all checks pass on the first runWhether the supplier runs checks locally before pushing
Estimate against actualActual effort or duration against the agreed estimate per itemPredictability for your own planning
Documentation completenessItems delivered with configuration and deployment notes updatedWhether you can support the work without the supplier

Как принимать плагины и PCF от субподрядчика, если код приходит без тестов и с захардкоженными GUID?

Запишите стандарт приемки в договор или SOW и проверяйте его автоматически в конвейере сборки. Код ревью в конце проекта не решает проблему: нужен стандарт, который одинаков для всех подрядчиков, и пайплайн, который блокирует слияние, если стандарт нарушен.

Минимальный стандарт для плагинов Dataverse, PCF и расширений Business Central на AL:

  • Бизнес логика вынесена из метода Execute и покрыта модульными тестами, которые запускаются при каждой сборке.
  • Никаких захардкоженных GUID, URL и имен записей: значения берутся из переменных среды (environment variables), таблицы настроек или ищутся по альтернативному ключу.
  • Все компоненты поставляются в решении (solution), собранном из системы контроля версий, а не отдельной сборкой или ручным импортом.
  • В конвейере: сборка и тесты, solution checker для Dataverse, ESLint для PCF, анализаторы CodeCop, UICop и PerTenantExtensionCop для AL.
  • Код поступает через pull request в ваш репозиторий; ревьюер проверяет архитектуру по короткому чек листу и возвращает код с письменной причиной, а не исправляет сам.
  • Карта качества подрядчика: доля pull request, принятых с первого раза, дефекты на задачу, дефекты, найденные в UAT и в продуктиве, повторно открытые дефекты и трудозатраты на переделку. Пороговые значения задайте по собственной базовой линии.

How does Solzet deliver plugins, PCF controls and AL code?

To the standard on this page. Solzet delivers its own plugins, PCF controls and Business Central AL extensions with unit tests in the build, configuration instead of constants, solutions and apps built from source control, and automated checks that block the merge, through pull requests into the repository you name. As a white-label subcontractor we accept your acceptance standard and scorecard in the statement of work, and our own senior developers do the work; the commercial model is on white-label Dynamics 365 subcontracting, control development on PCF controls development and AL work on Business Central AL development.

For clients who need CRM without Microsoft licensing, the same standard applies to a custom CRM built on React, Node.js, PostgreSQL and .NET. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.

What do people ask us?

How do we stop subcontractors hard-coding GUIDs in Dynamics 365 plugins?

Make it an acceptance criterion and check it automatically. Values that differ between environments come from environment variables, a configuration table or a lookup by alternate key, and a pipeline check rejects GUID literals outside test code.

What should an acceptance standard for subcontracted plugins and PCF controls include?

Unit tests that run in the build, configuration instead of constants, components delivered in a solution built from source control, tracing and actionable errors, and automated checks such as solution checker and ESLint that block the merge.

Which code quality checks should a Business Central AL subcontractor pass?

The CodeCop, UICop and PerTenantExtensionCop analyzers, plus AppSourceCop for Marketplace apps, with a ruleset in the repository; a test app with test codeunits run by the pipeline; setup tables instead of hard-coded values; and builds from a pipeline such as AL-Go for GitHub.

Which KPIs belong on a Dynamics 365 subcontractor scorecard?

First-pass pull request acceptance, defects found in test per item, defects escaping to UAT and production, reopened defects, rework effort, pipeline pass rate, estimate against actual and documentation completeness, with thresholds set from your own baseline.

Should we fix subcontracted code ourselves when it fails review?

No. Reject the pull request with a written reason. Fixing it yourself hides the rework from the scorecard and the supplier never learns the standard.

Субподрядчик сдает плагины без тестов и с захардкоженными GUID: что делать?

Запишите стандарт приемки в SOW: модульные тесты, значения из переменных среды или таблиц настроек вместо констант, поставка в решении из системы контроля версий и автоматические проверки в пайплайне. Принимайте код только через pull request и ведите карту качества подрядчика.

Does Solzet deliver to this standard?

Yes. Solzet delivers plugins, PCF controls and AL extensions with tests, configuration over constants, solutions built from source control and automated checks, and accepts your standard and scorecard in the statement of work.

Which solution is right for your business?

Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.