Announcements
No record found.
We are experiencing an issue when integrating return orders.
For instance, let's say we have an order containing item A with a quantity of 2. The company managing our logistics sends a return via API by splitting the line into two separate lines with a quantity of 1 each, in order to assign a return reason to each quantity.
This process works correctly; however, when the connector imports the return order, an error occurs because both split lines contain the same Order Line ID, causing a failure in the following function:
ReturnLocations.Add(OrderLIneID,LocationId) cant work because he has 2 lines with same orderlineiD...
its on the codeunit : codeunit 30250 "Shpfy Returns API"
Since their is no event on the shopify connectors can someone give me some hint to find a solution ?
Thanks for your help !
codeunit 50101 "Custom Shopify Returns Handler" { [EventSubscriber(ObjectType::Codeunit, Codeunit::"Shpfy Returns API", 'OnAfterImportReturn', '', true, true)] local procedure OnAfterImportReturn(ErrorOccurred: Boolean; ReturnOrderNo: Code[20]) var CustomReturnLog: Record "Custom Return Log"; begin if ErrorOccurred then begin CustomReturnLog.Init(); CustomReturnLog."Return Order No." := ReturnOrderNo; CustomReturnLog."Error Description" := GetLastErrorText(); CustomReturnLog.Insert(); // Optionally, trigger a job to reprocess with corrected data ReprocessReturnOrder(ReturnOrderNo); end; end; local procedure ReprocessReturnOrder(ReturnOrderNo: Code[20]) var // Logic to retrieve, modify, and re-import the return order data begin // Implement logic to fetch the original JSON, modify OrderLineIds, and re-import end; }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 2,012 Super User 2026 Season 1
YUN ZHU 986 Super User 2026 Season 1
Teagen Boll 659 Super User 2026 Season 1