bcquality/microsoft/knowledge/upgrade/install-code-does-not-run-on-version-upgrade.bad.al
Jesper Schulz-Wedde 0c2a0ceb82 Add lifecycle error and privacy knowledge
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 95c06ad8-377d-4faa-8d07-06300b1c81ec
2026-07-14 12:02:49 +02:00

20 lines
471 B
AL

codeunit 50306 "My App Install Only"
{
Subtype = Install;
trigger OnInstallAppPerCompany()
begin
// A normal version upgrade never invokes this migration.
MigrateLegacySetup();
end;
local procedure MigrateLegacySetup()
var
MyAppSetup: Record "My App Setup";
begin
if MyAppSetup.Get() then begin
MyAppSetup."Configuration Version" := 2;
MyAppSetup.Modify(true);
end;
end;
}