#10005 Improve error messages when there are no quantities to reverse in shipped/received lines in Sales/Purchase/Transfer
Error messages when reversing shipped or received lines now distinguish between no reversible quantities and already-reversed lines, providing clearer guidance for users and AI agents.
- 12files
- 6AL files
- 5objects
Pull request · merged into main (BC30) on 2026-08-06 by JakovljevicDusan · 12 files (+78 -17), 6 AL · fix · tier official · reviewed (checked by Opus)
What changed
- An empty selection after filtering (for example only comment or blank lines) now raises a new, action-oriented error
- The existing ‘already reversed’ error is kept only for lines that really are reversed
- Fixes the misleading message first seen in Undo Return Shipment
- Error messages are aligned across undo codeunits for sales, purchase, return and transfer documents
- Tests updated for the new messages
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 9030 “Undo Transfer Shipment”, Base Application: modified
- Codeunit 5813 “Undo Purchase Receipt Line”, Base Application: modified
- Codeunit 5814 “Undo Return Shipment Line”, Base Application: modified
- Codeunit 5816 “Undo Return Receipt Line”, Base Application: modified
- Codeunit 5815 “Undo Sales Shipment Line”, Base Application: modified
src/Layers/RU/BaseApp/Sales/History/UndoSalesShipmentLine.Codeunit.al: modified, not in the BC30 snapshot
Context
- Work items: AB#644161
- Labels: Team: SCM
- Systems: purchasing, sales, inventory
- From the description: “Message wording is action-oriented so both users and AI agents get a clear next step.”
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).