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
This commit is contained in:
parent
9214f73819
commit
0c2a0ceb82
25 changed files with 457 additions and 37 deletions
|
|
@ -0,0 +1,48 @@
|
|||
codeunit 50304 "My App Install"
|
||||
{
|
||||
Subtype = Install;
|
||||
|
||||
trigger OnInstallAppPerCompany()
|
||||
begin
|
||||
InitializeSetup();
|
||||
end;
|
||||
|
||||
local procedure InitializeSetup()
|
||||
var
|
||||
MyAppSetup: Record "My App Setup";
|
||||
begin
|
||||
if MyAppSetup.IsEmpty() then
|
||||
MyAppSetup.Insert(true);
|
||||
end;
|
||||
}
|
||||
|
||||
codeunit 50305 "My App Upgrade"
|
||||
{
|
||||
Subtype = Upgrade;
|
||||
|
||||
trigger OnUpgradePerCompany()
|
||||
var
|
||||
UpgradeTag: Codeunit "Upgrade Tag";
|
||||
begin
|
||||
if UpgradeTag.HasUpgradeTag(ConfigurationVersionTag()) then
|
||||
exit;
|
||||
|
||||
MigrateLegacySetup();
|
||||
UpgradeTag.SetUpgradeTag(ConfigurationVersionTag());
|
||||
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;
|
||||
|
||||
local procedure ConfigurationVersionTag(): Code[250]
|
||||
begin
|
||||
exit('MS-50305-ConfigurationVersion-20260714');
|
||||
end;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue