Add 12 general AL event-design articles to events domain

Add 12 atomic knowledge articles under microsoft/knowledge/events covering
general AL event-design best practices: IsHandled initialization and OnAfter
preservation, appending new event parameters, position-based event naming,
reusing/extending events, avoiding per-iteration publishing, Temp-prefixing
temporary record parameters, unabbreviated parameter names, preferring the
this keyword over IncludeSender, avoiding loosely typed parameters, not
mutating existing event contracts, and not bypassing critical operations
with IsHandled. Each article ships a .good.al and .bad.al demonstration
sample (object IDs 50240-50296; not compiled by CI). Extend the
al-events-review leaf Worklist with one targeted check per new rule.

Additive only; no contract or wiring change (events leaf already wired).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jesper Schulz-Wedde 2026-06-23 15:07:39 +02:00
parent 54ddd8ecc2
commit faeacb2484
37 changed files with 900 additions and 1 deletions

View file

@ -0,0 +1,14 @@
// Demonstration-only AL. Not compiled by CI; illustrates the article.
codeunit 50280 "Sender This Good Sample"
{
procedure ProcessOrder(OrderNo: Code[20])
begin
// Pass the current instance explicitly as a typed Sender parameter.
OnBeforeProcessOrder(OrderNo, this);
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeProcessOrder(OrderNo: Code[20]; Sender: Codeunit "Sender This Good Sample")
begin
end;
}