code change · fixIntegration & APIsofficial - Microsoftreviewed - checked by Opus

#12333 Keep the draft unit of measure and variant code when creating the purchase line

Unit of measure and variant code on purchase draft lines now persist when creating the final purchase invoice line.

Pull request · merged into main (BC30) on 2026-10-13 by Explorer986 · 3 files (+371 -3), 2 AL · fix · tier official · reviewed (checked by Opus)

What changed

  • Moved unit of measure and variant code assignment to after No. and Item Reference validation
  • Validation now occurs through proper Validate calls to maintain Qty. per Unit of Measure consistency
  • Prevents unit of measure from being dropped or reset to item default during finalization
  • Invalid unit of measure now triggers e-document error context instead of silent default
  • Comprehensive test coverage added for the scenario
  • Behaviour changes for users or extensions.

AL objects touched

Also merged into

  • #13067 into releases/29.x on 2026-10-22

Context

  • Work items: AB#650977
  • Labels: AL: Apps (W1), Team: Integrations
  • Systems: integration
  • From the description: “Moved both to after the No. and Item Reference validations, through Validate so Qty. per Unit of Measure stays right.”

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