mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 15:46:55 +01:00
Tighten declined-confirm, delete and insert trigger articles after review
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a0d23a982c
commit
4e2a3ead4d
8 changed files with 42 additions and 28 deletions
|
|
@ -9,15 +9,19 @@ table 50100 "Sample Mailbox Watch"
|
|||
{
|
||||
trigger OnValidate()
|
||||
var
|
||||
ReplaceWatchQst: Label 'Email %1 is being watched. Stop watching it and watch %2 instead?', Comment = '%1 = previous email address, %2 = new email address';
|
||||
StopWatchingQst: Label 'Email %1 is being watched. Stop watching it?', Comment = '%1 = previous email address';
|
||||
begin
|
||||
if (xRec."Watched Email" <> '') and (xRec."Watched Email" <> "Watched Email") then begin
|
||||
if "Watched Email" = xRec."Watched Email" then
|
||||
exit;
|
||||
if xRec."Watched Email" <> '' then begin
|
||||
// Declining cancels the whole change: the field keeps its old value.
|
||||
if not Confirm(ReplaceWatchQst, false, xRec."Watched Email", "Watched Email") then
|
||||
if not Confirm(StopWatchingQst, false, xRec."Watched Email") then
|
||||
Error('');
|
||||
Unsubscribe("Subscription ID");
|
||||
Clear("Subscription ID");
|
||||
end;
|
||||
"Subscription ID" := Subscribe("Watched Email");
|
||||
if "Watched Email" <> '' then
|
||||
"Subscription ID" := Subscribe("Watched Email");
|
||||
end;
|
||||
}
|
||||
field(3; "Subscription ID"; Guid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue