code change · fixSales & Receivablesofficial - Microsoftreviewed - checked by Opus

#13417 [Master]-Sales Order line quantities are incorrectly updated after posting a Return Order linked to a Posted Sales Invoice via Applies-to Doc. No. on a Credit Memo.

Posting a return order that is linked to a posted sales invoice through Applies-to Doc. No. on a credit memo no longer updates the original sales order line quantities incorrectly. The fix is in Correct Posted Sales Invoice for the W1, APAC and ES layers, with new tests.

Pull request · merged into main (BC30) on 2026-11-02 by neeleshsinghal · 5 files (+202 -0), 3 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Fixes issue where return order posting incorrectly adjusted sales order line quantities
  • Involves credit memo applies-to document links to posted invoices
  • Changes made to correct posted sales invoice codeunit across regions
  • Added test coverage for the purchase/sales copy document scenario
  • Behaviour changes for users or extensions.

AL objects touched

Context

  • Work items: AB#657201
  • Labels: Team: SCM
  • Systems: sales

No source states these links: they share an object, a model read them, or a person found the same subject.

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).