#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.
- 3files
- 2AL files
- 2objects
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
- Codeunit 6402 “E-Doc. Purch. Doc. Helper”, EDocument: modified
- Table 6101 “E-Document Purchase Line”, EDocument: modified
Also merged into
- #13067 into
releases/29.xon 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.”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Match Purchase Invoice Drafts to Purchase Orders — possibly related: E-document purchase line unit of measure handling relates to matching invoices to purchase orders. (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).