Skip to content

Add data-modeling and appsource knowledge articles (MICROSOFT layer)#65

Open
JesperSchulz wants to merge 1 commit into
mainfrom
jesperschulz-jesperschulz-data-modeling-knowledge
Open

Add data-modeling and appsource knowledge articles (MICROSOFT layer)#65
JesperSchulz wants to merge 1 commit into
mainfrom
jesperschulz-jesperschulz-data-modeling-knowledge

Conversation

@JesperSchulz

Copy link
Copy Markdown
Contributor

Summary

Adds 7 remedial BCQuality knowledge articles (MICROSOFT layer) on AL master-table / data-model design, each with good.al + bad.al samples — 21 files total. For review only.

Do not merge — opened for review at the requester's instruction.

Articles

data-modeling (new domain)

  1. master-table-no-from-number-series-in-oninsert — master PK is No. Code[20] assigned from a number series in OnInsert, not an AutoIncrement/GUID/SystemId.
  2. use-no-series-codeunit-not-noseriesmanagement — use codeunit 310 "No. Series" (GetNextNo/IsManual); the legacy NoSeriesManagement (cu 396) is obsolete-pending.
  3. setup-table-is-a-singleton — one blank-keyed Primary Key Code[10] row; Card page with InsertAllowed/DeleteAllowed = false.
  4. set-last-date-modified-in-onmodify-and-onrename — refresh Last Date Modified in both triggers (rename does not fire OnModify).
  5. check-blocked-in-referencing-code-not-in-master — enforce Blocked via TestField in the consuming code, not in the master's own triggers.

style (existing domain)
6. applicationarea-required-on-page-controls — every page control needs ApplicationArea (AppSourceCop AS0062) or it is silently hidden in the Web client. (ToolTip is the separate CodeCop AA0218 rule.)

appsource (new domain)
7. object-affixes-prevent-collisions — reserved affix on own objects and on members added to base objects (AppSourceCop AS0011).

New domains & CODEOWNERS

Two NEW domains are introduced: data-modeling and appsource. Both are covered by the catch-all /microsoft/ @jesperschulz gate in CODEOWNERS, so review is not left unowned. However, unlike the established domains (events, performance, privacy, security, style, testing, upgrade), they do not yet have dedicated domain-expert reviewer lines — adding /microsoft/knowledge/data-modeling/ and /microsoft/knowledge/appsource/ lines may be wanted. (Article 6 lands in style/, which already has reviewers.)

Provenance (clean-room / no courseware)

Authored entirely from my own Business Central knowledge, with BC-specific facts verified against public sources only (learn.microsoft.com, microsoft/BCApps). No licensed courseware wording, structure, code, or example project was accessed or reproduced. Example objects use a neutral Loyalty / Membership theme.

Validation

Article count: 192 → 199 (+7, exactly as expected). knowledge-index.json is gitignored and is not committed.

$ python .github/scripts/validate_frontmatter.py --root .
Validator: 0 error(s), 0 warning(s)
$ pwsh .github/scripts/Test-KnowledgeIndex.ps1 -Root .
BCQuality index: 199 article(s). Index: ...\a.json
BCQuality index: 199 article(s). Index: ...\b.json
Knowledge-index check PASSED: 199 articles, deterministic, full coverage, selection inputs intact.
$ pwsh ./tools/Build-KnowledgeIndex.ps1
BCQuality index: 199 article(s). Index: ...\knowledge-index.json
199

Note on branch name

The requested branch name was jesperschulz-data-modeling-knowledge. The session branch-rename tool auto-prefixes the username and locks after the first rename, yielding jesperschulz-jesperschulz-data-modeling-knowledge; raw git branch -m is disallowed in this worktree. Rename on GitHub if the exact name is required.

Author 7 remedial BCQuality knowledge articles plus good/bad AL samples
(21 files) covering AL master-table and data-model design:

- data-modeling: master No. from number series in OnInsert; use codeunit
  "No. Series" not obsolete NoSeriesManagement; setup table is a singleton;
  set Last Date Modified in OnModify and OnRename; enforce Blocked in
  referencing code not in the master.
- style: ApplicationArea required on page controls (AS0062).
- appsource: object affixes prevent collisions (AS0011).

Clean-room authored from own BC knowledge; specifics verified against public
sources only (learn.microsoft.com, microsoft/BCApps). Introduces two new
domains (data-modeling, appsource).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@@ -0,0 +1,28 @@
---
bc-version: [all]
domain: data-modeling

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I'm a fan of the "data-modeling" domain. Need to think that properly through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants