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

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>
This commit is contained in:
Jesper Schulz-Wedde 2026-07-01 11:00:05 +02:00
parent 24e62f5ec8
commit 18cb503540
21 changed files with 885 additions and 0 deletions

View file

@ -0,0 +1,70 @@
table 50364 "Loyalty Setup"
{
Caption = 'Loyalty Setup';
DataClassification = CustomerContent;
fields
{
field(1; "Primary Key"; Code[10])
{
Caption = 'Primary Key';
}
field(10; "Member Nos."; Code[20])
{
Caption = 'Member Nos.';
TableRelation = "No. Series";
}
}
keys
{
key(PK; "Primary Key")
{
Clustered = true;
}
}
procedure GetRecordOnce()
begin
if Rec.Get() then
exit;
Rec.Init();
Rec.Insert();
end;
}
page 50365 "Loyalty Setup"
{
Caption = 'Loyalty Setup';
PageType = Card;
SourceTable = "Loyalty Setup";
UsageCategory = Administration;
ApplicationArea = All;
InsertAllowed = false;
DeleteAllowed = false;
layout
{
area(Content)
{
group(Numbering)
{
Caption = 'Numbering';
field("Member Nos."; Rec."Member Nos.")
{
ApplicationArea = All;
ToolTip = 'Specifies the number series used to assign member numbers.';
}
}
}
}
trigger OnOpenPage()
begin
Rec.Reset();
if not Rec.Get() then begin
Rec.Init();
Rec.Insert();
end;
end;
}