diff --git a/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCompany.Codeunit.al b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCompany.Codeunit.al index d9cdf1303b..baf86ef600 100644 --- a/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCompany.Codeunit.al +++ b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCompany.Codeunit.al @@ -43,7 +43,7 @@ codeunit 30313 "Shpfy Metafield Owner Company" implements "Shpfy IMetafield Owne procedure CanEditMetafields(Shop: Record "Shpfy Shop"): Boolean begin - exit(Shop."Can Update Shopify Companies"); + exit((Shop."Can Update Shopify Companies") and (Shop."Company Import From Shopify" <> Enum::"Shpfy Company Import Range"::AllCompanies)); end; } diff --git a/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCustomer.Codeunit.al b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCustomer.Codeunit.al index 0f4713b44d..779fd82d80 100644 --- a/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCustomer.Codeunit.al +++ b/Apps/W1/Shopify/app/src/Metafields/Codeunits/IOwnerType/ShpfyMetafieldOwnerCustomer.Codeunit.al @@ -23,7 +23,7 @@ codeunit 30333 "Shpfy Metafield Owner Customer" implements "Shpfy IMetafield Own Parameters.Add('CustomerId', Format(OwnerId)); GraphQLType := GraphQLType::CustomerMetafieldIds; JResponse := CommunicationMgt.ExecuteGraphQL(GraphQLType, Parameters); - if JsonHelper.GetJsonArray(JResponse, JMetafields, 'data.product.metafields.edges') then + if JsonHelper.GetJsonArray(JResponse, JMetafields, 'data.customer.metafields.edges') then foreach JItem in JMetafields do if JsonHelper.GetJsonObject(JItem.AsObject(), JNode, 'node') then begin Id := CommunicationMgt.GetIdOfGId(JsonHelper.GetValueAsText(JNode, 'legacyResourceId')); @@ -45,6 +45,6 @@ codeunit 30333 "Shpfy Metafield Owner Customer" implements "Shpfy IMetafield Own procedure CanEditMetafields(Shop: Record "Shpfy Shop"): Boolean begin - exit(Shop."Can Update Shopify Customer"); + exit((Shop."Can Update Shopify Customer") and (Shop."Customer Import From Shopify" <> Enum::"Shpfy Customer Import Range"::AllCustomers)); end; } \ No newline at end of file