diff --git a/src/System Application/App/Extension Management/src/ExtensionInstallationImpl.Codeunit.al b/src/System Application/App/Extension Management/src/ExtensionInstallationImpl.Codeunit.al index c8e9fa8a7f..3c7f340cc5 100644 --- a/src/System Application/App/Extension Management/src/ExtensionInstallationImpl.Codeunit.al +++ b/src/System Application/App/Extension Management/src/ExtensionInstallationImpl.Codeunit.al @@ -53,7 +53,8 @@ codeunit 2500 "Extension Installation Impl" exit(not NAVAppInstalledApp.IsEmpty()); end; - procedure IsInstalledByAppId(AppID: Guid): Boolean + + procedure IsInstalledByAppId(AppId: Guid): Boolean var [SecurityFiltering(SecurityFilter::Ignored)] NAVAppInstalledApp: Record "NAV App Installed App"; @@ -209,7 +210,7 @@ codeunit 2500 "Extension Installation Impl" exit(UninstallExtensionSilently(PackageID, ClearSchema, ClearSchema)); end; - procedure DeleteOrphanData(PackageID: Guid; ExtensionName: Text): Boolean + procedure DeleteOrphanData(AppId: Guid; ExtensionName: Text): Boolean var ConfirmManagement: Codeunit "Confirm Management"; begin @@ -217,7 +218,7 @@ codeunit 2500 "Extension Installation Impl" if not ConfirmManagement.GetResponse(StrSubstNo(ClearExtensionSchemaOrphanMsg, ExtensionName), false) then exit(false); - exit(UninstallExtensionSilently(PackageID, false, true)); + exit(UninstallExtensionSilentlyByAppId(AppId, false, true)); end; procedure RunOrphanDeletion(OrphanedApplication: Record "Extension Database Snapshot"): Boolean @@ -228,7 +229,6 @@ codeunit 2500 "Extension Installation Impl" exit(OrphanedExtensionDetails.RunModal() = Action::OK); end; - local procedure UninstallExtensionSilently(PackageID: Guid; ClearData: Boolean; ClearSchema: Boolean): Boolean begin CheckPermissions(); @@ -241,6 +241,18 @@ codeunit 2500 "Extension Installation Impl" exit(true); end; + local procedure UninstallExtensionSilentlyByAppId(AppId: Guid; ClearData: Boolean; ClearSchema: Boolean): Boolean + begin + CheckPermissions(); + AssertIsInitialized(); + DotNetNavAppALInstaller.ALUninstallNavAppByAppId(AppId, ClearData, ClearSchema); + + if IsInstalledByAppId(AppId) then + exit(false); + + exit(true); + end; + procedure UninstallExtensionWithConfirmDialog(PackageId: Guid; ClearData: Boolean; ClearSchema: Boolean): Boolean var PublishedApplication: Record "Published Application"; diff --git a/src/System Application/App/Extension Management/src/ExtnOrphanedAppDetails.Page.al b/src/System Application/App/Extension Management/src/ExtnOrphanedAppDetails.Page.al index 304cb5e4e5..2550164e6c 100644 --- a/src/System Application/App/Extension Management/src/ExtnOrphanedAppDetails.Page.al +++ b/src/System Application/App/Extension Management/src/ExtnOrphanedAppDetails.Page.al @@ -73,7 +73,7 @@ page 2513 "Extn. Orphaned App Details" trigger OnAction() begin - ExtensionInstallationImpl.DeleteOrphanData(Rec."Package Id", Rec."Name"); + ExtensionInstallationImpl.DeleteOrphanData(Rec."App Id", Rec."Name"); CurrPage.Close(); end; }