mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-08-06 17:36:53 +01:00
* Add lifecycle error and privacy knowledge Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec * Fix lifecycle privacy review findings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a26cd6d6-ff49-433e-bc53-f645c455ebdd * Refine lifecycle privacy retrieval Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec * Make review gates explicit Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec --------- Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
24 lines
635 B
AL
24 lines
635 B
AL
codeunit 50235 "Upgrade With Validation"
|
|
{
|
|
Subtype = Upgrade;
|
|
|
|
trigger OnValidateUpgradePerCompany()
|
|
begin
|
|
// A full-table scan repeats on every upgrade.
|
|
ValidateAllCustomers();
|
|
end;
|
|
|
|
local procedure ValidateAllCustomers()
|
|
var
|
|
Customer: Record Customer;
|
|
begin
|
|
if Customer.FindSet() then
|
|
repeat
|
|
if Customer."Customer Posting Group" = 'OLD' then
|
|
Error(MigrationIncompleteErr);
|
|
until Customer.Next() = 0;
|
|
end;
|
|
|
|
var
|
|
MigrationIncompleteErr: Label 'The legacy customer posting group was not migrated.';
|
|
}
|