Add P0 event and interface compatibility knowledge (#98)

* Add P0 extensibility compatibility knowledge

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 645349fd-1892-48f3-8a84-db77d6abd1c3

* Correct event compatibility guidance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 645349fd-1892-48f3-8a84-db77d6abd1c3

---------

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
This commit is contained in:
Jesper Schulz-Wedde 2026-07-14 12:51:59 +02:00 committed by GitHub
parent 078b869e33
commit 363f08f47e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 331 additions and 32 deletions

View file

@ -1,21 +1,14 @@
// Demonstration-only AL. Not compiled by CI; illustrates the article.
// Demonstration-only AL. Version 1 exposed PostDocument(SalesHeader).
codeunit 50251 "Param Append Bad Sample"
{
procedure PostDocument(var SalesHeader: Record "Sales Header"; CalledFromBatch: Boolean)
var
IsHandled: Boolean;
procedure PostDocument(var SalesHeader: Record "Sales Header")
begin
IsHandled := false;
// Anti-pattern: 'CalledFromBatch' was inserted before the existing
// IsHandled parameter, shifting it and breaking the argument positions
// every existing subscriber relied on.
OnBeforePostDocument(SalesHeader, CalledFromBatch, IsHandled);
if IsHandled then
exit;
// Existing callers cannot supply the newly required argument.
OnBeforePostDocument(SalesHeader);
end;
[IntegrationEvent(false, false)]
local procedure OnBeforePostDocument(var SalesHeader: Record "Sales Header"; CalledFromBatch: Boolean; var IsHandled: Boolean)
procedure OnBeforePostDocument(var SalesHeader: Record "Sales Header"; CalledFromBatch: Boolean)
begin
end;
}