#14490 [Master]-Repeated partial return posting reuses first credit memo and corrupts original order quantities
Fixed repeated partial return postings that were incorrectly reusing the first credit memo and corrupting original order quantities. The fix ensures each posting uses the current credit memo to update order quantities correctly.
- 14files
- 12AL files
- 1objects
Pull request · merged into main (BC30) on 2026-11-26 by neeleshsinghal · 14 files (+252 -60), 12 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Repeated partial returns reused the first credit memo instead of the latest posted one
- This corrupted the quantities on the original sales order
- Sales-Post now updates order quantities from the current posting’s credit memo held in a global variable
- Change applied to Sales-Post in the W1, APAC, BE, CH, ES, FI, FR, GB, IT, NA, NO and RU layers
- Regression tests added in ERM Copy Purch Sales Doc (W1 and APAC)
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 80 “Sales-Post”, Base Application: modified
src/Layers/BE/BaseApp/Sales/Posting/SalesPost.Codeunit.al: modified, not in the BC30 snapshotsrc/Layers/FI/BaseApp/Sales/Posting/SalesPost.Codeunit.al: modified, not in the BC30 snapshotsrc/Layers/NO/BaseApp/Sales/Posting/SalesPost.Codeunit.al: modified, not in the BC30 snapshot
Also merged into
- #14700 into
releases/29.xon 2026-12-01
Context
- Work items: AB#660149
- Labels: Team: SCM
- Systems: sales
- From the description: “Use the current posting’s credit memo to update order quantities correctly from global variable”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Design details - Item tracking posting structure — possibly related: touches Codeunit 80 “Sales-Post”
- Snapshot debugging — possibly related: touches Codeunit 80 “Sales-Post”
- Process sales return orders — possibly related: Documents sales return orders and partial return posting workflows. (model-linked)
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).