#12554 [Main] - User encounters a "record is not open" error when attaching a document to a posted sales shipment in Dynamics 365 (Base Application v28)
Document attachment uploads now work correctly for posted sales shipments and return receipts by adding missing table references and hardening error handling.
- 9files
- 7AL files
- 7objects
Pull request · merged into main (BC30) on 2026-10-13 by DhavalMore88 (community contribution) · 9 files (+732 -151), 7 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Added Sales Shipment Header and Return Receipt Header cases to GetRefTable in Document Attachment Mgmt
- Uploading files from the Documents FactBox on posted sales shipments and return receipts no longer fails with ‘The record is not open’
- Upload files, Show details and Attach from email in the FactBox now raise a clear error if the source record still cannot be resolved after OnAfterGetRecRefFail
- Follows the existing pattern used for Sales Invoice Header and Sales Cr.Memo Header
- Regression tests added in W1 and ES test layers
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 6169 “E-Doc. Attachment Processor”, EDocument: modified
- Codeunit 6989 “Expense Attachment Mgt.”, ExpenseAgent: modified
- Codeunit 8059 “Sub. Contracts General Mgt.”, Subscription Billing: modified
- Page 1178 “Doc. Attachment List Factbox”, Base Application: modified
- Codeunit 1173 “Document Attachment Mgmt”, Base Application: modified
- Codeunit 99000783 “Prod. Document Attachment Mgt.”, Base Application: modified
- Codeunit 6459 “Serv. Document Attachment Mgt.”, Base Application: modified
Also merged into
- #12815 into
releases/29.xon 2026-11-03
Context
- Work items: AB#646549
- Labels: ADO: Sync, AL: Apps (W1), From Fork, Ownership: Needs Review, Team: Other
- Systems: platform, copilot, integration, manufacturing, sales, service
- From the description: “Added the missing Database::Sales Shipment Header and Database::Return Receipt Header cases to GetRefTable, each opening the RecordRef on its table.”
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Create Incoming Document Records Directly from Documents and Entries — possibly related: Covers attaching documents to posted sales and purchase records including shipments. (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).