code change · fixPurchasing & Payablesofficial - Microsoftreviewed - checked by Opus

#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.

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

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).