Refine self-improvement review guidance

Narrow IsHandled, label-scope, UI-handler, checkpoint, and bulk-operation guidance to evidence-backed false-positive boundaries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
wenjiefan 2026-08-18 11:17:14 +02:00
parent 841b4e7cab
commit 5f1cff2fb6
21 changed files with 99 additions and 155 deletions

View file

@ -6,17 +6,17 @@ codeunit 50240 "IsHandled Init Good Sample"
DiscountPct: Decimal;
IsHandled: Boolean;
begin
IsHandled := false;
// A freshly declared local Boolean is false.
OnBeforeApplyHeaderDiscount(SalesHeader, DiscountPct, IsHandled);
if not IsHandled then
DiscountPct := 5;
if IsHandled then
exit;
DiscountPct := 5;
// Reset before reusing the same variable for the next event so a
// subscriber that handled the first raise can't suppress this one.
IsHandled := false;
// Reaching this point proves that IsHandled is still false.
OnBeforeApplyPaymentDiscount(SalesHeader, DiscountPct, IsHandled);
if not IsHandled then
DiscountPct += 2;
if IsHandled then
exit;
DiscountPct += 2;
end;
[IntegrationEvent(false, false)]