Heute 11:16
codeunit 90755 "XX Base Install Test"
{
Subtype = Install;
trigger OnInstallAppPerCompany()
var
AppInfo: ModuleInfo;
begin
NavApp.GetCurrentModuleInfo(AppInfo);
if AppInfo.DataVersion = Version.Create(0, 0, 0, 0) then
HandleFreshInstall()
else
HandleReinstall();
end;
local procedure HandleFreshInstall()
begin
//No Error Occur
end;
local procedure HandleReinstall()
begin
Error('Something....bad happend');
end;
}
Heute 14:10
Install code is run only when an extension version is first installed or reinstalled by running the Install-NAVApp cmdlet or from the Extension Management page in the client. Install code isn't run when a new version of an existing extension is installed as part the upgrade operation by running the Start-NAVAppDataUgrade cmdlet. For upgrade, see Upgrading Extensions.
Heute 15:59
sweikelt hat geschrieben:Für eine neue Version, brauchst du eine UpdateCodeunit
-> Subtype = Upgrade;
falsch interpretiert. Aus dem weiteren Kontext wird jedoch deutlich, dass sich der Reinstall nur auf dieselbe Version beziehen darf.Install code is run only when an extension version is first installed or reinstalled by running the Install-NAVApp cmdlet or from the Extension Management page in the client.
// If not a fresh install, then we are Re-installing the same version of the extension
HandleReinstall;