---
id: change/bcapps/11342
type: change
title: "#11342 [29.x][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachmentsIntial Commit"
summary: Document attachments transferred after posting a sales invoice or credit memo now correctly retain the posted document type instead of being incorrectly set to Quote.
tier: official
language: en
tags:
  - fix
  - releases/29.x
  - bc29
  - codeunit document attachment mgmt
  - codeunit serv. document attachment mgt.
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:57.446Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 9abb50c16236576e55a88b35c2720e194db37b9c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/11342
    title: "microsoft/BCApps#11342: [29.x][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachmentsIntial Commit"
    date: "2026-09-29"
    commit: 9abb50c16236576e55a88b35c2720e194db37b9c
    t: null
    quote: Document Type was cleared. Because Quote is enum value 0, clearing the field implicitly assigned Quote.
links:
  learn: []
  objects:
    - object/codeunit/1173
    - object/codeunit/6459
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 11342
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/11342
kind: pr
base_branch: releases/29.x
major: "29"
merged_at: "2026-09-29T11:10:29Z"
author: sanjmaurya
author_type: User
community_contribution: false
labels:
  - "Ownership: Manual"
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 4
  additions: 409
  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:
  - 649906
systems:
  - platform
  - service
quote: Document Type was cleared. Because Quote is enum value 0, clearing the field implicitly assigned Quote.
joined_against:
  major: "29"
  commit: 1d24dd5ee2a734510f0556ccc69342d0e616db2f
---

# #11342 [29.x][ALL-E] Document Type is Quote in Document Attachment table (1173) after posting a Sales Invoice with attachmentsIntial Commit

> Document attachments transferred after posting a sales invoice or credit memo now correctly retain the posted document type instead of being incorrectly set to Quote.

[Pull request](https://github.com/microsoft/BCApps/pull/11342) · merged into `releases/29.x` (BC29) on 2026-09-29 by sanjmaurya · 4 files (+409 -2), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Attachment transfers during document posting were clearing the document type field, defaulting to Quote enum value 0
- Logic updated to explicitly set document type based on the posted document table
- Posted invoice attachments now have Invoice type, posted credit memos have Credit Memo type
- Regression tests added to verify correct document type assignment for both header and line attachments
- 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#649906
- Labels: Ownership: Manual, Team: SCM
- Systems: platform, service
- From the description: "Document Type was cleared. Because Quote is enum value 0, clearing the field implicitly assigned Quote."

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