When shopify imports orders, the event publisher OnBeforeProcessSalesDocuments is never triggered unless all lines are mapped to items.
This is because the report 30104 "Shpfy Sync Orders from Shopify" calls the "DoMapping" function before calling the CreateSalesDocumentForOrders(OrderHeader);
This is a problem for my client, becuase we have a customization that will handle mapping depending on attributes. The customization subscribes to the OnBeforeProcessSalesDocuments publisher.
Describe the issue
When shopify imports orders, the event publisher OnBeforeProcessSalesDocuments is never triggered unless all lines are mapped to items. This is because the report 30104 "Shpfy Sync Orders from Shopify" calls the "DoMapping" function before calling the CreateSalesDocumentForOrders(OrderHeader);
This is a problem for my client, becuase we have a customization that will handle mapping depending on attributes. The customization subscribes to the OnBeforeProcessSalesDocuments publisher.
https://github.com/microsoft/ALAppExtensions/blob/18455700ada751a86886a8cefdb071bd4a76ce71/Apps/W1/Shopify/app/src/Order%20handling/Reports/ShpfySyncOrdersfromShopify.Report.al#L65-L67
Expected behavior
There should be no call to the DoMapping function, as this is already a part of the process of creating sales documents.
Steps to reproduce
Additional context
No response
I will provide a fix for a bug