ield Barcode by de Shopify-Variants is now filled with the information from article reference, but I want is to be filled from the item card, GTIN code. I added event trigger and modify but this not working.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Shpfy Product Events", OnAfterCreateItemVariant, '', false, false)]
local procedure "Shpfy Product Events_OnAfterCreateItemVariant"(Shop: Record "Shpfy Shop"; ShopifyProduct: Record "Shpfy Product"; var ShopifyVariant: Record "Shpfy Variant"; Item: Record Item; var ItemVariant: Record "Item Variant")
begin
if Item."GTIN" <> '' then begin
ShopifyVariant."Barcode" := Item."GTIN";
ShopifyVariant.Modify();
end;
end;