From 42c4244cc24cceb59285283966bc3340a180a650 Mon Sep 17 00:00:00 2001 From: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com> Date: Thu, 6 Aug 2026 18:41:45 +0200 Subject: [PATCH] [Shopify] Don't block Shops page when user lacks extension permissions SendBelgianLocalizationNotification called ExtensionManagement.IsInstalledByAppId unconditionally in OnOpenPage. That check requires Read+Write permission on 'NAV App Installed App' and errors otherwise, blocking the whole page from opening. Wrap the check in a TryFunction so a permission (or any) error simply skips the non-actionable install notification. Fixes AB#646122 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 71270cfc-012a-4d2a-9fdc-cf13ec1b176c --- .../src/Base/Codeunits/ShpfyShopMgt.Codeunit.al | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyShopMgt.Codeunit.al b/src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyShopMgt.Codeunit.al index daf13274603..9b1d48c694a 100644 --- a/src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyShopMgt.Codeunit.al +++ b/src/Apps/W1/Shopify/App/src/Base/Codeunits/ShpfyShopMgt.Codeunit.al @@ -121,13 +121,16 @@ codeunit 30211 "Shpfy Shop Mgt." var MyNotifications: Record "My Notifications"; EnvironmentInformation: Codeunit "Environment Information"; - ExtensionManagement: Codeunit "Extension Management"; BelgianLocalizationNotification: Notification; + IsInstalled: Boolean; begin if EnvironmentInformation.GetApplicationFamily() <> BelgianCountryCodeTok then exit; - if ExtensionManagement.IsInstalledByAppId(GetBelgianLocalizationAppId()) then + if not TryIsBelgianLocalizationInstalled(IsInstalled) then + exit; + + if IsInstalled then exit; if not MyNotifications.IsEnabled(GetBelgianLocalizationNotificationId()) then @@ -141,6 +144,14 @@ codeunit 30211 "Shpfy Shop Mgt." BelgianLocalizationNotification.Send(); end; + [TryFunction] + local procedure TryIsBelgianLocalizationInstalled(var IsInstalled: Boolean) + var + ExtensionManagement: Codeunit "Extension Management"; + begin + IsInstalled := ExtensionManagement.IsInstalledByAppId(GetBelgianLocalizationAppId()); + end; + procedure InstallBelgianLocalization(Notification: Notification) var ExtensionManagement: Codeunit "Extension Management";