Skip to content

Conversation

@onbuyuka
Copy link
Contributor

@onbuyuka onbuyuka commented Jan 12, 2026

Summary

This PR fixes a bug where the Shopify Connector was incorrectly using the Order Line ID instead of the actual Refund Line ID when creating refund line records. The issue caused incorrect data to be stored in the "Refund Line Id" field of the "Shpfy Refund Line" table.

Problem

When importing refund lines from Shopify, the system was extracting the lineItem.id from the GraphQL response and using it as both the "Refund Line Id" and "Order Line Id". This was incorrect because:

  • lineItem.id represents the original order line item
  • The actual refund line has its own unique ID that should be stored in "Refund Line Id"

Solution

  1. Updated GraphQL queries to include the id field for refund line items:

    • ShpfyGQLRefundLines.Codeunit.al - Added id to the nodes selection
    • ShpfyGQLNextRefundLines.Codeunit.al - Added id to the nodes selection
  2. Updated the refund line import logic in ShpfyRefundsAPI.Codeunit.al:

    • Now correctly extracts the refund line's own id for the "Refund Line Id" field
    • Uses lineItem.id only for the "Order Line Id" field (the reference to the original order line)

Work Item(s)

Fixes AB#617843

@onbuyuka onbuyuka requested a review from a team as a code owner January 12, 2026 10:58
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Jan 12, 2026
@github-actions github-actions bot added this to the Version 28.0 milestone Jan 12, 2026
@onbuyuka onbuyuka enabled auto-merge (squash) January 12, 2026 11:02
JesperSchulz
JesperSchulz previously approved these changes Jan 12, 2026
AndreiPanko
AndreiPanko previously approved these changes Jan 12, 2026
@onbuyuka onbuyuka dismissed stale reviews from AndreiPanko and JesperSchulz via f7ddeba January 12, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants