bcquality/microsoft/knowledge/events/prefer-reusing-or-extending-existing-events.good.al
Jesper Schulz-Wedde bc8686d871 Fix lifecycle compatibility guidance
Correct high-confidence Business Central guidance and samples for upgrade tags, collectible errors, trigger semantics, obsoletion, events, interfaces, API contracts, and test transactions.

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

Copilot-Session: e05a43e7-6448-4d67-9c73-798523f5d945
2026-07-14 10:51:12 +02:00

20 lines
720 B
AL

// Demonstration-only AL. Not compiled by CI; illustrates the article.
codeunit 50260 "Reuse Event Good Sample"
{
procedure ProcessOrder(var SalesHeader: Record "Sales Header"; CustomerNo: Code[20])
var
IsHandled: Boolean;
begin
IsHandled := false;
// A single event, extended with CustomerNo appended at the end, covers
// the need; no second event is raised beside it.
OnBeforeProcessOrder(SalesHeader, IsHandled, CustomerNo);
if IsHandled then
exit;
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeProcessOrder(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; CustomerNo: Code[20])
begin
end;
}