Address review: notification recall defect is a lost identity, not an unassigned or generated Id

- notification-recall-needs-known-id: the defect is a Recall() whose Id
  cannot be the sent one (fresh local Notification, new CreateGuid at
  recall time) while neither the sent instance nor its Id is kept. A
  retained global instance (CreateGuid once in OnOpenPage, or Id left for
  Send to assign), a generated Id saved after Send and reassigned before
  Recall, and correctly tracked per-record Ids are explicitly not findings.
  Findings require evidence that the recalled identity differs from or
  cannot recover the sent identity. Notification Lifecycle Mgt. is
  recommended for per-record tracking, not mandatory. Cites VAT Bus. Post.
  Grp. Part, Certificate, and Data Search Lines, and the lifecycle
  helper's Send-then-read-Id sequence.
- good sample: adds a page with a retained global Notification (CreateGuid
  in OnOpenPage, Send in an action, Recall in a later action and
  OnClosePage) and a pageextension that saves the Send-assigned Id and
  recalls it from a later action. Bad sample comments name the lost
  identity.
- al-ui-review: notification cue requires that evidence and lists the
  retained-instance, saved-Id, and direct per-record tracking controls as
  exclusions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael Dieringer 2026-10-05 16:05:59 +02:00
parent a37f45ada4
commit cff8917ecb
4 changed files with 144 additions and 12 deletions

View file

@ -5,13 +5,14 @@ pageextension 50720 "Sample Customer Card Ext" extends "Customer Card"
NoCreditLimitNotification: Notification;
begin
if Rec."Credit Limit (LCY)" = 0 then begin
// No Id is assigned: Send assigns one that this code never keeps.
// Send assigns an Id, but this local variable is discarded and
// the Id is not saved anywhere.
NoCreditLimitNotification.Message := NoCreditLimitMsg;
NoCreditLimitNotification.Scope := NotificationScope::LocalScope;
NoCreditLimitNotification.Send();
end else
// This new variable has no Id, so the warning sent for the
// previous customer is not withdrawn.
// A fresh local variable with no Id cannot be the notification
// sent for the previous customer, so that warning is not withdrawn.
NoCreditLimitNotification.Recall();
end;