---
id: change/bcapps/11114
type: change
title: "#11114 [Master][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachments."
summary: Document Type is now correctly set to Invoice or Credit Memo when attachments are transferred to posted sales documents, fixing an issue where the type was incorrectly defaulting to Quote.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit document attachment mgmt
  - codeunit serv. document attachment mgt.
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:04:49.872Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 3bf5e5637c2e05147fed0e82c990b0e8522af987
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11114
    title: "microsoft/BCApps#11114: [Master][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachments."
    date: "2026-09-16"
    commit: 3bf5e5637c2e05147fed0e82c990b0e8522af987
    t: null
    quote: Set the Document Type according to the posted document table instead of clearing it.
links:
  learn: []
  objects:
    - object/codeunit/1173
    - object/codeunit/6459
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11114
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11114
kind: pr
base_branch: main
major: "30"
merged_at: "2026-09-16T13:09:03Z"
author: sanjmaurya
author_type: User
community_contribution: false
labels:
  - "Ownership: Needs Review"
  - "Team: Other"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 408
  deletions: 2
  al: 2
apps:
  - Base Application
objects_touched:
  - key: codeunit/1173
    page: codeunit/1173
    type: codeunit
    id: 1173
    name: Document Attachment Mgmt
    app: Base Application
    status: modified
  - key: codeunit/6459
    page: codeunit/6459
    type: codeunit
    id: 6459
    name: Serv. Document Attachment Mgt.
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 649254
systems:
  - platform
  - service
quote: Set the Document Type according to the posted document table instead of clearing it.
joined_against:
  major: "30"
  commit: ecbc028c25dbe83b61313bc566e6c1d41184bb1c
---

# #11114 [Master][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachments.

> Document Type is now correctly set to Invoice or Credit Memo when attachments are transferred to posted sales documents, fixing an issue where the type was incorrectly defaulting to Quote.

[Pull request](https://github.com/microsoft/BCApps/pull/11114) · merged into `main` (BC30) on 2026-09-16 by sanjmaurya · 4 files (+408 -2), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Document attachments transferred to posted invoices now have Document Type set to Invoice instead of Quote
- Document attachments transferred to posted credit memos now have Document Type set to Credit Memo
- The fix applies to both header and line attachments
- Both sales and service document attachment management were updated
- Regression tests added to verify correct behavior
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 1173 "Document Attachment Mgmt"](../../objects/codeunit/1173.md), Base Application: modified
- [Codeunit 6459 "Serv. Document Attachment Mgt."](../../objects/codeunit/6459.md), Base Application: modified

## Context

- Work items: AB#649254
- Labels: Ownership: Needs Review, Team: Other
- Systems: platform, service
- From the description: "Set the Document Type according to the posted document table instead of clearing it."

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