From 0d728298efa0dc112bae858aab792e7c6fc43d46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 08:01:36 +0000 Subject: [PATCH] knowledge: improve review precision from BCApps PR 10990-neg-3926331607-source-faithful-20261005 feedback --- ...eding-does-not-require-upgrade-codeunit.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 microsoft/knowledge/upgrade/contoso-demo-data-seeding-does-not-require-upgrade-codeunit.md diff --git a/microsoft/knowledge/upgrade/contoso-demo-data-seeding-does-not-require-upgrade-codeunit.md b/microsoft/knowledge/upgrade/contoso-demo-data-seeding-does-not-require-upgrade-codeunit.md new file mode 100644 index 0000000..7d420e0 --- /dev/null +++ b/microsoft/knowledge/upgrade/contoso-demo-data-seeding-does-not-require-upgrade-codeunit.md @@ -0,0 +1,36 @@ +--- +bc-version: [all] +domain: upgrade +keywords: [contoso-demo-data-module, demo-tool, demo-data, upgrade-codeunit, preview, false-positive] +technologies: [al] +countries: [w1] +application-area: [all] +--- + +# Contoso demo-data seeding does not need an upgrade codeunit + +## Description + +Codeunits that `implements "Contoso Demo Data Module"` (the Contoso demo-data-tool +interface, e.g. `CreateSetupData`, `CreateMasterData`, `CreateTransactionalData`, +`CreateHistoricalData`) are only ever invoked on demand by the demo data tool when a +user explicitly chooses to generate or refresh Contoso demo data. They are not part of +the extension's install/upgrade lifecycle: the platform never calls them automatically, +and no already-provisioned tenant silently receives their records on extension +upgrade — the user must rerun the demo tool to get new or changed Contoso records, for +every change in that data, not just this one. Adding new seeding steps (for example a +new reference/rate table population) inside `CreateMasterData`/`CreateSetupData` of +such a module is consistent with every other Contoso demo-data change and does not +leave real tenant data stale. The `upgrade-codeunit-subtype` and +`install-code-does-not-run-on-version-upgrade` rules govern code that must run against +real, already-provisioned tenant data; they do not apply to Contoso demo/preview data +generation. + +## Best Practice + +Do not require `Subtype = Upgrade` wiring, `OnUpgradePerCompany`/`OnUpgradePerDatabase` +entry points, or an upgrade codeunit for new seeding logic added to a codeunit that +implements `"Contoso Demo Data Module"` and is only reached through +`CreateSetupData`/`CreateMasterData`/`CreateTransactionalData`/`CreateHistoricalData`. +Flag missing upgrade wiring only when the changed code also runs for real tenants +outside the demo tool's on-demand generation flow.