diff --git a/build/groups.json b/build/groups.json index e4b7555d17..711e80c3ca 100644 --- a/build/groups.json +++ b/build/groups.json @@ -2049,6 +2049,48 @@ } ] }, + { + "name": "Shopify Connector BE", + "groups": [ + { + "name": "AllExtensions" + }, + { + "name": "Financials" + }, + { + "name": "FinancialsExtensions" + }, + { + "name": "OnPrem" + }, + { + "name": "OnPremExtensions" + } + ] + }, + { + "name": "Shopify Connector BE Test", + "groups": [ + { + "name": "AllExtensions" + }, + { + "name": "Financials" + }, + { + "name": "FinancialsExtensions" + }, + { + "name": "OnPrem", + "doNotInstall": true + }, + { + "name": "OnPremExtensions", + "doNotInstall": true + } + ] + }, { "name": "Data Archive", "groups": [ diff --git a/build/projects.json b/build/projects.json index 22725f15a6..423e102096 100644 --- a/build/projects.json +++ b/build/projects.json @@ -2106,6 +2106,29 @@ ], "owningteam": "\\AI Business Solutions\\Integrations" }, + "Shopify Connector BE": { + "projectPath": "$env:INETROOT\\App\\BCApps\\src\\Apps\\BE\\ShopifyBE\\App", + "dvdFolder": "Applications\\ShopifyBE\\Source", + "skipInstallOnPrem": true, + "hasTranslations": true, + "supportedCountries": "BE", + "runStaticCodeAnalysis": true, + "logLevel": "warning", + "ruleSetPath": "$env:INETROOT\\App\\BCApps\\src\\rulesets\\ruleset.json", + "ruleSetPathMinorRelease": "$env:INETROOT\\App\\BCApps\\src\\rulesets\\minorrelease.ruleset.json", + "owningteam": "\\AI Business Solutions\\Integrations" + }, + "Shopify Connector BE Test": { + "projectPath": "$env:INETROOT\\App\\BCApps\\src\\Apps\\BE\\ShopifyBE\\Test", + "dvdFolder": "Applications\\ShopifyBE\\Test", + "supportedCountries": "BE", + "isTest": true, + "runStaticCodeAnalysis": true, + "logLevel": "warning", + "ruleSetPath": "$env:INETROOT\\App\\BCApps\\src\\rulesets\\ruleset.json", + "ruleSetPathMinorRelease": "$env:INETROOT\\App\\BCApps\\src\\rulesets\\minorrelease.ruleset.json", + "owningteam": "\\AI Business Solutions\\Integrations" + }, "Company Hub": { "projectPath": "$env:INETROOT\\App\\Apps\\W1\\CompanyHub\\app", "dvdFolder": "Applications\\CompanyHub\\Source", diff --git a/build/projects/Apps BE/.AL-Go/settings.json b/build/projects/Apps BE/.AL-Go/settings.json index 4f03a7c972..b2575da14e 100644 --- a/build/projects/Apps BE/.AL-Go/settings.json +++ b/build/projects/Apps BE/.AL-Go/settings.json @@ -8,6 +8,7 @@ "../../../src/Apps/BE/HybridBCLast_BE/app", "../../../src/Apps/BE/IntrastatBE/app", "../../../src/Apps/BE/PEPPOLBE/App", + "../../../src/Apps/BE/ShopifyBE/App", "../../../src/Apps/W1/AMCBanking365Fundamentals/app", "../../../src/Apps/W1/APIReportsFinance/App", "../../../src/Apps/W1/APIV1/app", @@ -116,6 +117,7 @@ "../../../src/Tools/Test Framework/Test Stability Tools/Prevent Metadata Updates" ], "testFolders": [ + "../../../src/Apps/BE/ShopifyBE/Test", "../../../src/Apps/W1/AMCBanking365Fundamentals/test", "../../../src/Apps/W1/APIV1/test", "../../../src/Apps/W1/APIV2/test", diff --git a/src/Apps/BE/ShopifyBE/App/ExtensionLogo.png b/src/Apps/BE/ShopifyBE/App/ExtensionLogo.png new file mode 100644 index 0000000000..39226d84c7 Binary files /dev/null and b/src/Apps/BE/ShopifyBE/App/ExtensionLogo.png differ diff --git a/src/Apps/BE/ShopifyBE/App/app.json b/src/Apps/BE/ShopifyBE/App/app.json new file mode 100644 index 0000000000..2c81ecc95e --- /dev/null +++ b/src/Apps/BE/ShopifyBE/App/app.json @@ -0,0 +1,42 @@ +{ + "id": "c2d93c78-f87a-4b0e-b71f-570f578d78de", + "name": "Shopify Connector BE", + "publisher": "Microsoft", + "brief": "Belgium localization for the Shopify Connector.", + "description": "Adds Belgium-specific tax identifier mapping to the Shopify Connector so that Belgian B2B companies and customers can be synchronized using the Enterprise No., as required by the Belgian localization.", + "version": "29.0.0.0", + "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", + "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", + "help": "https://go.microsoft.com/fwlink/?linkid=2179727", + "url": "https://go.microsoft.com/fwlink/?LinkId=724011", + "logo": "ExtensionLogo.png", + "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2179727", + "propagateDependencies": true, + "dependencies": [ + { + "id": "ec255f57-31d0-4ca2-b751-f2fa7c745abb", + "name": "Shopify Connector", + "publisher": "Microsoft", + "version": "29.0.0.0" + } + ], + "screenshots": [], + "platform": "29.0.0.0", + "idRanges": [ + { + "from": 30461, + "to": 30465 + } + ], + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "application": "29.0.0.0", + "target": "OnPrem", + "features": [ + "NoImplicitWith", + "TranslationFile" + ] +} diff --git a/src/Apps/BE/ShopifyBE/App/src/ShpfyCompTaxIdMappingBE.EnumExt.al b/src/Apps/BE/ShopifyBE/App/src/ShpfyCompTaxIdMappingBE.EnumExt.al new file mode 100644 index 0000000000..74f3e4f2a9 --- /dev/null +++ b/src/Apps/BE/ShopifyBE/App/src/ShpfyCompTaxIdMappingBE.EnumExt.al @@ -0,0 +1,17 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.Integration.Shopify.BE; + +using Microsoft.Integration.Shopify; + +enumextension 30461 "Shpfy Comp. Tax Id Mapping BE" extends "Shpfy Comp. Tax Id Mapping" +{ + value(30461; "Enterprise No.") + { + Caption = 'Enterprise No.'; + Implementation = "Shpfy Tax Registration Id Mapping" = "Shpfy Enterprise No. BE"; + } +} diff --git a/src/Apps/BE/ShopifyBE/App/src/ShpfyEnterpriseNoBE.Codeunit.al b/src/Apps/BE/ShopifyBE/App/src/ShpfyEnterpriseNoBE.Codeunit.al new file mode 100644 index 0000000000..0166012e16 --- /dev/null +++ b/src/Apps/BE/ShopifyBE/App/src/ShpfyEnterpriseNoBE.Codeunit.al @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.Integration.Shopify.BE; + +using Microsoft.Integration.Shopify; +using Microsoft.Sales.Customer; + +/// +/// Codeunit Shpfy Enterprise No. BE (ID 30461) implements Interface Shpfy Tax Registration Id Mapping. +/// Maps the Shopify tax registration id to the Belgian Enterprise No. field on the customer, +/// which is the legally required tax identifier for Belgian customers. +/// +codeunit 30461 "Shpfy Enterprise No. BE" implements "Shpfy Tax Registration Id Mapping" +{ + Access = Internal; + + procedure GetTaxRegistrationId(var Customer: Record Customer): Text[150] + begin + exit(Customer."Enterprise No."); + end; + + procedure SetMappingFiltersForCustomers(var Customer: Record Customer; CompanyLocation: Record "Shpfy Company Location") + begin + Customer.SetRange("Enterprise No.", CompanyLocation."Tax Registration Id"); + end; + + procedure UpdateTaxRegistrationId(var Customer: Record Customer; NewTaxRegistrationId: Text[150]) + begin + Customer.Validate("Enterprise No.", CopyStr(NewTaxRegistrationId, 1, MaxStrLen(Customer."Enterprise No."))); + Customer.Modify(true); + end; +} diff --git a/src/Apps/BE/ShopifyBE/ShopifyBE.code-workspace b/src/Apps/BE/ShopifyBE/ShopifyBE.code-workspace new file mode 100644 index 0000000000..356b5cacbc --- /dev/null +++ b/src/Apps/BE/ShopifyBE/ShopifyBE.code-workspace @@ -0,0 +1,13 @@ +{ + "folders": [ + { + "name": "App", + "path": "App" + }, + { + "name": "Test", + "path": "Test" + } + ], + "settings": {} +} diff --git a/src/Apps/BE/ShopifyBE/Test/ExtensionLogo.png b/src/Apps/BE/ShopifyBE/Test/ExtensionLogo.png new file mode 100644 index 0000000000..39226d84c7 Binary files /dev/null and b/src/Apps/BE/ShopifyBE/Test/ExtensionLogo.png differ diff --git a/src/Apps/BE/ShopifyBE/Test/app.json b/src/Apps/BE/ShopifyBE/Test/app.json new file mode 100644 index 0000000000..f3ca691f19 --- /dev/null +++ b/src/Apps/BE/ShopifyBE/Test/app.json @@ -0,0 +1,70 @@ +{ + "id": "8bd23d6b-a8c4-449c-a6a0-7f7ebbd71de8", + "name": "Shopify Connector BE Test", + "publisher": "Microsoft", + "brief": "Tests for the Shopify Connector BE extension.", + "description": "Tests for the Belgium localization of the Shopify Connector.", + "version": "29.0.0.0", + "privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", + "EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", + "help": "https://go.microsoft.com/fwlink/?linkid=2179727", + "url": "https://go.microsoft.com/fwlink/?LinkId=724011", + "logo": "ExtensionLogo.png", + "contextSensitiveHelpUrl": "https://go.microsoft.com/fwlink/?linkid=2179727", + "dependencies": [ + { + "id": "c2d93c78-f87a-4b0e-b71f-570f578d78de", + "name": "Shopify Connector BE", + "publisher": "Microsoft", + "version": "29.0.0.0" + }, + { + "id": "ec255f57-31d0-4ca2-b751-f2fa7c745abb", + "name": "Shopify Connector", + "publisher": "Microsoft", + "version": "29.0.0.0" + }, + { + "id": "5d86850b-0d76-4eca-bd7b-951ad998e997", + "name": "Tests-TestLibraries", + "publisher": "Microsoft", + "version": "29.0.0.0" + }, + { + "id": "9856ae4f-d1a7-46ef-89bb-6ef056398228", + "name": "System Application Test Library", + "publisher": "Microsoft", + "version": "29.0.0.0" + }, + { + "id": "e7320ebb-08b3-4406-b1ec-b4927d3e280b", + "name": "Any", + "publisher": "Microsoft", + "version": "29.0.0.0" + }, + { + "id": "dd0be2ea-f733-4d65-bb34-a28f4624fb14", + "name": "Library Assert", + "publisher": "Microsoft", + "version": "29.0.0.0" + } + ], + "screenshots": [], + "platform": "29.0.0.0", + "idRanges": [ + { + "from": 148710, + "to": 148719 + } + ], + "target": "OnPrem", + "resourceExposurePolicy": { + "allowDebugging": true, + "allowDownloadingSource": true, + "includeSourceInSymbolFile": true + }, + "application": "29.0.0.0", + "features": [ + "TranslationFile" + ] +} diff --git a/src/Apps/BE/ShopifyBE/Test/src/ShpfyTaxIdMappingBETest.Codeunit.al b/src/Apps/BE/ShopifyBE/Test/src/ShpfyTaxIdMappingBETest.Codeunit.al new file mode 100644 index 0000000000..96f443f8e9 --- /dev/null +++ b/src/Apps/BE/ShopifyBE/Test/src/ShpfyTaxIdMappingBETest.Codeunit.al @@ -0,0 +1,142 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace Microsoft.Integration.Shopify.BE.Test; + +using Microsoft.Integration.Shopify; +using Microsoft.Sales.Customer; +using System.TestLibraries.Utilities; + +codeunit 148710 "Shpfy Tax Id Mapping BE Test" +{ + Subtype = Test; + TestPermissions = Disabled; + EventSubscriberInstance = Manual; + + var + Any: Codeunit Any; + LibraryAssert: Codeunit "Library Assert"; + IsInitialized: Boolean; + + trigger OnRun() + begin + IsInitialized := false; + end; + + [Test] + procedure UnitTestGetTaxRegistrationIdForEnterpriseNo() + var + Customer: Record Customer; + TaxRegistrationIdMapping: Interface "Shpfy Tax Registration Id Mapping"; + EnterpriseNo: Text[50]; + EnterpriseNoResult: Text[150]; + begin + // [SCENARIO] GetTaxRegistrationId for the Belgian Enterprise No. implementation of the mapping + Initialize(); + + // [GIVEN] Enterprise No. + EnterpriseNo := CopyStr(Any.AlphanumericText(50), 1, MaxStrLen(EnterpriseNo)); + // [GIVEN] Customer with the Enterprise No. + CreateCustomerWithEnterpriseNo(Customer, EnterpriseNo); + // [GIVEN] TaxRegistrationIdMapping interface is "Enterprise No." + TaxRegistrationIdMapping := Enum::"Shpfy Comp. Tax Id Mapping"::"Enterprise No."; + + // [WHEN] GetTaxRegistrationId is called + EnterpriseNoResult := TaxRegistrationIdMapping.GetTaxRegistrationId(Customer); + + // [THEN] The result is the same as the Enterprise No. field of the Customer record + LibraryAssert.AreEqual(EnterpriseNo, EnterpriseNoResult, 'Enterprise No.'); + end; + + [Test] + procedure UnitTestSetMappingFiltersForCustomersWithEnterpriseNo() + var + Customer: Record Customer; + CompanyLocation: Record "Shpfy Company Location"; + TaxRegistrationIdMapping: Interface "Shpfy Tax Registration Id Mapping"; + EnterpriseNo: Text[50]; + begin + // [SCENARIO] SetMappingFiltersForCustomers for the Belgian Enterprise No. implementation of the mapping + Initialize(); + + // [GIVEN] Enterprise No. + EnterpriseNo := CopyStr(Any.AlphanumericText(50), 1, MaxStrLen(EnterpriseNo)); + // [GIVEN] Customer record with the Enterprise No. + CreateCustomerWithEnterpriseNo(Customer, EnterpriseNo); + // [GIVEN] CompanyLocation record with Tax Registration Id + CreateLocationWithTaxId(CompanyLocation, EnterpriseNo); + // [GIVEN] TaxRegistrationIdMapping interface is "Enterprise No." + TaxRegistrationIdMapping := Enum::"Shpfy Comp. Tax Id Mapping"::"Enterprise No."; + + // [WHEN] SetMappingFiltersForCustomers is called + TaxRegistrationIdMapping.SetMappingFiltersForCustomers(Customer, CompanyLocation); + + // [THEN] The range of the Customer record is set to the Tax Registration Id of the CompanyLocation record + LibraryAssert.AreEqual(EnterpriseNo, Customer.GetFilter("Enterprise No."), 'Enterprise No. filter is not set correctly.'); + end; + + [Test] + procedure UnitTestUpdateTaxRegistrationIdForEnterpriseNo() + var + Customer: Record Customer; + ShpfyTaxIdMappingBETest: Codeunit "Shpfy Tax Id Mapping BE Test"; + TaxRegistrationIdMapping: Interface "Shpfy Tax Registration Id Mapping"; + NewTaxRegistrationId: Text[150]; + begin + // [SCENARIO] UpdateTaxRegistrationId for the Belgian Enterprise No. implementation of the mapping + Initialize(); + + // [GIVEN] New Tax Registration Id + NewTaxRegistrationId := CopyStr(Any.AlphanumericText(20), 1, MaxStrLen(Customer."Enterprise No.")); + // [GIVEN] Customer with empty Enterprise No. + CreateCustomerWithEnterpriseNo(Customer, ''); + // [GIVEN] TaxRegistrationIdMapping interface is "Enterprise No." + TaxRegistrationIdMapping := Enum::"Shpfy Comp. Tax Id Mapping"::"Enterprise No."; + + // [WHEN] UpdateTaxRegistrationId is called + // Bypass the Belgian Enterprise No. validation (country/MOD97 checks) to isolate the mapping logic + BindSubscription(ShpfyTaxIdMappingBETest); + TaxRegistrationIdMapping.UpdateTaxRegistrationId(Customer, NewTaxRegistrationId); + UnbindSubscription(ShpfyTaxIdMappingBETest); + + // [THEN] The Enterprise No. field of the Customer record is updated + Customer.Get(Customer."No."); + LibraryAssert.AreEqual(NewTaxRegistrationId, Customer."Enterprise No.", 'Enterprise No. should be updated.'); + end; + + local procedure Initialize() + begin + Any.SetDefaultSeed(); + + if IsInitialized then + exit; + + IsInitialized := true; + + Commit(); + end; + + local procedure CreateCustomerWithEnterpriseNo(var Customer: Record Customer; EnterpriseNo: Text[50]) + begin + Customer.Init(); + Customer."No." := CopyStr(Any.AlphanumericText(20), 1, MaxStrLen(Customer."No.")); + Customer."Enterprise No." := EnterpriseNo; + Customer.Insert(false); + end; + + local procedure CreateLocationWithTaxId(var CompanyLocation: Record "Shpfy Company Location"; TaxRegistrationId: Text[50]) + begin + CompanyLocation.Init(); + CompanyLocation.Id := Any.IntegerInRange(10000, 99999); + CompanyLocation."Tax Registration Id" := TaxRegistrationId; + CompanyLocation.Insert(false); + end; + + [EventSubscriber(ObjectType::Table, Database::Customer, 'OnBeforeValidateEnterpriseNo', '', false, false)] + local procedure HandleOnBeforeValidateEnterpriseNo(var Customer: Record Customer; xCustomer: Record Customer; CurrFieldNo: Integer; var IsHandled: Boolean) + begin + IsHandled := true; + end; +} 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 e123c416cf..daf1327460 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 @@ -5,13 +5,18 @@ namespace Microsoft.Integration.Shopify; +using System.Apps; +using System.Environment; using System.Environment.Configuration; using System.Feedback; codeunit 30211 "Shpfy Shop Mgt." { var - DontShowThisAgainMsg: Label 'Don''t show this again.'; + BelgianCountryCodeTok: Label 'BE', Locked = true; + BelgianLocalizationAppIdTok: Label 'c2d93c78-f87a-4b0e-b71f-570f578d78de', Locked = true; + InstallActionLbl: Label 'Install'; + DontShowThisAgainLbl: Label 'Don''t show this again.'; ExpirationNotificationMsg: Label 'The Shopify Admin API used by your current Shopify connector will go out of support on %1. Please upgrade your Business Central environment.', Comment = '%1 - expiry date'; BlockedNotificationMsg: Label 'The Shopify Admin API used by your current Shopify connector is no longer supported. To continue using the Shopify connector, please upgrade your Business Central environment.'; ExpirationNotificationNameTok: Label 'Notify user of Shopify connector going out of support.'; @@ -20,6 +25,9 @@ codeunit 30211 "Shpfy Shop Mgt." BlockedNotificationDescTok: Label 'Show a notification informing the user that Shopify connector is out of support.'; NoItemNotificationNameTok: Label 'Notify user of Shopify connector has no items.'; NoItemNotificationDescTok: Label 'Show a notification informing the user that Shopify connector has no items.'; + BelgianLocalizationNotificationMsg: Label 'Belgian customers use the Enterprise No. as their tax registration identifier. Install the Shopify Connector BE extension to synchronize Belgian companies and customers.'; + BelgianLocalizationNotificationNameTok: Label 'Notify user to install the Shopify Connector BE extension.'; + BelgianLocalizationNotificationDescTok: Label 'Show a notification informing the user that the Shopify Connector BE extension is required for Belgian localizations.'; internal procedure IsEnabled(): Boolean var @@ -41,7 +49,7 @@ codeunit 30211 "Shpfy Shop Mgt." ExpirationNotification.Id := GetExpirationNotificationId(); ExpirationNotification.Message := StrSubstNo(ExpirationNotificationMsg, Format(ExpiryDate)); ExpirationNotification.Scope := NotificationScope::LocalScope; - ExpirationNotification.AddAction(DontShowThisAgainMsg, Codeunit::"Shpfy Shop Mgt.", 'DisableExpirationNotification'); + ExpirationNotification.AddAction(DontShowThisAgainLbl, Codeunit::"Shpfy Shop Mgt.", 'DisableExpirationNotification'); ExpirationNotification.Send(); end; end; @@ -55,7 +63,7 @@ codeunit 30211 "Shpfy Shop Mgt." BlockedNotification.Id := GetBlockedNotificationId(); BlockedNotification.Message := BlockedNotificationMsg; BlockedNotification.Scope := NotificationScope::LocalScope; - BlockedNotification.AddAction(DontShowThisAgainMsg, Codeunit::"Shpfy Shop Mgt.", 'DisableBlockedNotification'); + BlockedNotification.AddAction(DontShowThisAgainLbl, Codeunit::"Shpfy Shop Mgt.", 'DisableBlockedNotification'); BlockedNotification.Send(); end; end; @@ -108,4 +116,54 @@ codeunit 30211 "Shpfy Shop Mgt." if not MyNotifications.Disable(GetNoItemNotificationId()) then MyNotifications.InsertDefault(GetNoItemNotificationId(), NoItemNotificationNameTok, NoItemNotificationDescTok, false); end; + + internal procedure SendBelgianLocalizationNotification() + var + MyNotifications: Record "My Notifications"; + EnvironmentInformation: Codeunit "Environment Information"; + ExtensionManagement: Codeunit "Extension Management"; + BelgianLocalizationNotification: Notification; + begin + if EnvironmentInformation.GetApplicationFamily() <> BelgianCountryCodeTok then + exit; + + if ExtensionManagement.IsInstalledByAppId(GetBelgianLocalizationAppId()) then + exit; + + if not MyNotifications.IsEnabled(GetBelgianLocalizationNotificationId()) then + exit; + + BelgianLocalizationNotification.Id := GetBelgianLocalizationNotificationId(); + BelgianLocalizationNotification.Message := BelgianLocalizationNotificationMsg; + BelgianLocalizationNotification.Scope := NotificationScope::LocalScope; + BelgianLocalizationNotification.AddAction(InstallActionLbl, Codeunit::"Shpfy Shop Mgt.", 'InstallBelgianLocalization'); + BelgianLocalizationNotification.AddAction(DontShowThisAgainLbl, Codeunit::"Shpfy Shop Mgt.", 'DisableBelgianLocalizationNotification'); + BelgianLocalizationNotification.Send(); + end; + + procedure InstallBelgianLocalization(Notification: Notification) + var + ExtensionManagement: Codeunit "Extension Management"; + begin + ExtensionManagement.InstallMarketplaceExtension(GetBelgianLocalizationAppId()); + end; + + procedure DisableBelgianLocalizationNotification(Notification: Notification) + var + MyNotifications: Record "My Notifications"; + begin + if MyNotifications.WritePermission() then + if not MyNotifications.Disable(GetBelgianLocalizationNotificationId()) then + MyNotifications.InsertDefault(GetBelgianLocalizationNotificationId(), BelgianLocalizationNotificationNameTok, BelgianLocalizationNotificationDescTok, false); + end; + + local procedure GetBelgianLocalizationNotificationId(): Guid + begin + exit('ca66423d-4607-4a81-8805-2f5e58e70373'); + end; + + local procedure GetBelgianLocalizationAppId(): Guid + begin + exit(BelgianLocalizationAppIdTok); + end; } \ No newline at end of file diff --git a/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyShops.Page.al b/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyShops.Page.al index 35f67bdab6..d8ee09f696 100644 --- a/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyShops.Page.al +++ b/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyShops.Page.al @@ -74,4 +74,11 @@ page 30102 "Shpfy Shops" } } } + + trigger OnOpenPage() + var + ShopMgt: Codeunit "Shpfy Shop Mgt."; + begin + ShopMgt.SendBelgianLocalizationNotification(); + end; } \ No newline at end of file