Add lifecycle error and privacy knowledge

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec
This commit is contained in:
Jesper Schulz-Wedde 2026-07-14 12:02:49 +02:00
parent 9214f73819
commit 0c2a0ceb82
25 changed files with 457 additions and 37 deletions

View file

@ -0,0 +1,32 @@
codeunit 50303 "Upgrade Phases Bad"
{
Subtype = Upgrade;
trigger OnCheckPreconditionsPerCompany()
begin
// A precondition check must not repair the data it is checking.
RenamePostingGroup();
end;
trigger OnValidateUpgradePerCompany()
begin
// Validation must not perform a migration omitted from OnUpgrade.
MigrateCustomerPostingGroups();
end;
local procedure RenamePostingGroup()
var
CustomerPostingGroup: Record "Customer Posting Group";
begin
if CustomerPostingGroup.Get('OLD') then
CustomerPostingGroup.Rename('NEW');
end;
local procedure MigrateCustomerPostingGroups()
var
Customer: Record Customer;
begin
Customer.SetRange("Customer Posting Group", 'OLD');
Customer.ModifyAll("Customer Posting Group", 'NEW');
end;
}