bcquality/microsoft/knowledge/upgrade/minimize-onvalidate-upgrade-triggers.good.al
Jesper Schulz-Wedde e0ebdd35c7
Add lifecycle error and privacy knowledge (#99)
* 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>
2026-07-14 12:52:56 +02:00

21 lines
524 B
AL

codeunit 50234 "Upgrade With Validation"
{
Subtype = Upgrade;
trigger OnValidateUpgradePerCompany()
begin
CheckNoLegacyPostingGroups();
end;
local procedure CheckNoLegacyPostingGroups()
var
Customer: Record Customer;
begin
Customer.SetRange("Customer Posting Group", 'OLD');
if not Customer.IsEmpty() then
Error(MigrationIncompleteErr);
end;
var
MigrationIncompleteErr: Label 'The legacy customer posting group was not migrated.';
}