Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Shopify: Unneccesary call to DoMapping function resulting in uncalled Event Publisher #26515

Open
1 task done
JeppeBylov opened this issue May 22, 2024 · 1 comment
Labels
approved The issue is approved Integration GitHub request for Integration area

Comments

@JeppeBylov
Copy link
Contributor

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.

if OrderMapping.DoMapping(OrderHeader) and (OrdersToImport."Import Action" = OrdersToImport."Import Action"::New) then
if Shop."Auto Create Orders" then
CreateSalesDocumentForOrders(OrderHeader);

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

  1. Create customization that handles mapping based on Order Line Attributes
  2. Sell item with Shopify
  3. Import order to BC, which gets the "Not everything can be mapped" error
  4. Click "Create Sales Documents"
  5. Sales order is now created

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug
@JeppeBylov JeppeBylov added the bug Something isn't working label May 22, 2024
@nikolakukrika nikolakukrika added the Integration GitHub request for Integration area label May 22, 2024
@JesperSchulz JesperSchulz added the approved The issue is approved label May 27, 2024
@JesperSchulz
Copy link
Contributor

Feel free to create e PR for this.

@aholstrup1 aholstrup1 removed the bug Something isn't working label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The issue is approved Integration GitHub request for Integration area
Projects
None yet
Development

No branches or pull requests

4 participants