---
title: "Codeunit 1173 Document Attachment Mgmt, extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/points/
object: https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/
app: "Base Application"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/
checked: 2026-11-20
changed: 2026-11-04
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 1173 Document Attachment Mgmt, extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/points/

81 procedures and triggers with a step in src/Layers/W1/BaseApp/Foundation/Attachment/DocumentAttachmentMgmt.Codeunit.al, in source order, read from the text, not from a run.

## DeleteAttachedDocuments

[Line 43](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L43).

- [52](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L52) calls `SetDocumentAttachmentFiltersForRecRef`
- [53](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L53) calls `AttachedDocumentsExist`
- [54](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L54) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) DeleteAll(true)

## DeleteAttachedDocumentsWithConfirm

[Line 57](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L57).

- [62](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L62) raises `OnBeforeDeleteAttachedDocumentsWithConfirm`, IsHandled
- [66](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L66) calls `AttachedDocumentsExist`
- [67](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L67) calls [Codeunit 27 Confirm Management](https://jonas-paprotka.de/ref/codeunit/27-confirm-management/) `GetResponseOrDefault`
- [68](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L68) calls `DeleteAttachedDocuments`

## AttachedDocumentsExist

[Line 71](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L71).

- [80](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L80) calls `SetDocumentAttachmentFiltersForRecRef`

## GetRefTable

[Line 98](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L98).

- [174](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L174) raises `OnAfterGetRefTable`

## SetDocumentAttachmentRelatedFiltersForRecRef

[Line 178](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L178).

- [180](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L180) calls `SetDocumentAttachmentFiltersForRecRefInternal`
- [181](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L181) raises `OnAfterSetDocumentAttachmentFiltersForRecRef`

## SetDocumentAttachmentFiltersForRecRef

[Line 184](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L184).

- [186](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L186) calls `SetDocumentAttachmentFiltersForRecRefInternal`
- [187](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L187) raises `OnAfterSetDocumentAttachmentFiltersForRecRef`

## SetDocumentAttachmentFiltersForRecRefInternal

[Line 190](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L190), internal.

- [200](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L200) calls `SetRelatedAttachmentsFilter`
- [204](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L204) calls `TableHasNumberFieldPrimayKey`
- [210](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L210) calls `TableHasDocTypePrimaryKey`
- [213](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L213) calls `TransformAttachmentDocumentTypeValue`
- [217](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L217) calls `TableHasLineNumberPrimaryKey`
- [223](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L223) calls `TableHasVATReportConfigCodePrimaryKey`
- [229](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L229) raises `OnAfterSetDocumentAttachmentFiltersForRecRefInternal`

## SetRelatedAttachmentsFilter

[Line 232](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L232), local.

- [249](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L249) raises `OnSetRelatedAttachmentsFilterOnBeforeSetTableIdFilter`

## IsServiceDocumentFlow

[Line 283](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L283), internal.

- [285](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L285) raises `OnAfterIsServiceDocumentFlow`

## IsProductionDocumentFlow

[Line 288](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L288), internal.

- [290](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L290) raises `OnAfterIsProductionDocumentFlow`

## IsFlowFieldsEditable

[Line 293](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L293), internal.

- [295](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L295) calls `TableIsDocument`
- [296](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L296) raises `OnAfterIsFlowFieldsEditable`

## TableIsDocument

[Line 299](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L299), local.

- [315](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L315) raises `OnAfterTableIsDocument`

## TableHasNumberFieldPrimayKey

[Line 318](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L318), internal.

- [357](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L357) raises `OnAfterTableHasNumberFieldPrimaryKey`

## TableHasDocTypePrimaryKey

[Line 361](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L361), internal.

- [377](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L377) raises `OnAfterTableHasDocTypePrimaryKey`

## TableHasLineNumberPrimaryKey

[Line 381](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L381), internal.

- [399](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L399) raises `OnAfterTableHasLineNumberPrimaryKey`

## TransformAttachmentDocumentTypeValue

[Line 415](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L415), internal.

- [417](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L417) raises `OnAfterTransformAttachmentDocumentTypeValue`

## DeleteAttachedDocumentsOnAfterDeleteCustomer

[Line 464](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L464), local.

- [469](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L469) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteSalesHeader

[Line 473](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L473), local.

- [478](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L478) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteSalesLine

[Line 482](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L482), local.

- [487](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L487) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteSalesCreditMemoHeader

[Line 491](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L491), local.

- [496](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L496) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteSalesCreditMemoLine

[Line 500](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L500), local.

- [505](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L505) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteSalesInvoiceHeader

[Line 509](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L509), local.

- [514](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L514) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteSalesInvoiceLine

[Line 518](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L518), local.

- [523](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L523) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeletePurchInvHeader

[Line 527](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L527), local.

- [532](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L532) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeletePurchInvLine

[Line 536](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L536), local.

- [541](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L541) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeletePurchCreditMemoHeader

[Line 545](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L545), local.

- [550](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L550) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeletePurchCreditMemoLine

[Line 554](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L554), local.

- [559](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L559) calls `DeleteAttachedDocuments`

## DocAttachFlowFromSalesQuoteToSalesOrder

[Line 563](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L563), local.

- [584](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L584) calls `CopyAttachments`

## DocAttachFlowForSalesHeaderFromBlanketOrderToSalesOrder

[Line 588](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L588), local.

- [609](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L609) calls `DeleteAttachedDocuments`
- [616](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L616) calls `CopyAttachments`

## DocAttachFlowForSalesLinesFromBlanketOrderToSalesOrder

[Line 620](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L620), local.

- [641](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L641) calls `DeleteAttachedDocuments`
- [647](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L647) calls `CopyAttachments`

## DocAttachFlowForSalesHeaderFromSalesQuoteToSalesInvoice

[Line 651](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L651), local.

- [672](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L672) calls `CopyAttachments`

## DocAttachFlowForSalesLinesFromSalesQuoteToSalesInvoice

[Line 676](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L676), local.

- [691](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L691) calls `CopyAttachments`

## DocAttachFlowForSalesHeaderInsert

[Line 695](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L695), local.

- [718](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L718) calls `CopyAttachments`

## DocAttachFlowForSalesQuoteToSalesOrderSalesLines

[Line 722](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L722), local.

- [737](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L737) calls `CopyAttachments`

## DocAttachFlowForSalesHeaderCustomerChg

[Line 741](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L741), local.

- [753](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L753) calls `DeleteAttachedDocumentsWithConfirm`
- [755](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L755) calls `DocAttachFlowForSalesHeaderInsert`

## DocAttachFlowForCopyDocumentSalesHeader

[Line 759](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L759), local.

- [761](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L761) calls `DocAttachFlowForSalesHeaderCustomerChg`

## DocAttachFlowForSalesLineInsert

[Line 765](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L765), local.

- [792](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L792) calls `CopyAttachments`

## DocAttachFlowForSalesLineItemChg

[Line 796](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L796), local.

- [808](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L808) calls `DeleteAttachedDocuments`
- [810](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L810) calls `DocAttachFlowForSalesLineInsert`

## DocAttachForPostedSalesDocs

[Line 814](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L814), local.

- [821](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L821) raises `OnBeforeDocAttachForPostedSalesDocs`, IsHandled
- [843](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L843) calls `CopyAttachmentsForPostedDocs`

## DocAttachForPostedPurchaseDocs

[Line 847](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L847), local.

- [854](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L854) raises `OnBeforeDocAttachForPostedPurchaseDocs`, IsHandled
- [875](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L875) calls `CopyAttachmentsForPostedDocs`
- [880](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L880) calls `CopyAttachmentsForPostedDocs`
- [885](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L885) calls `CopyAttachmentsForPostedDocs`

## DeleteAttachedDocumentsOnAfterDeleteVendor

[Line 890](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L890), local.

- [895](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L895) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeletePurchaseHeader

[Line 899](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L899), local.

- [904](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L904) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeletePurchaseLine

[Line 908](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L908), local.

- [913](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L913) calls `DeleteAttachedDocuments`

## DocAttachFlowForPurchaseHeaderInsert

[Line 917](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L917), local.

- [940](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L940) calls `CopyAttachments`

## DocAttachFlowForPurchaseHeaderVendorChange

[Line 944](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L944), local.

- [956](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L956) calls `DeleteAttachedDocumentsWithConfirm`
- [958](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L958) calls `DocAttachFlowForPurchaseHeaderInsert`

## DocAttachFlowForCopyDocumentPurchHeader

[Line 962](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L962), local.

- [964](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L964) calls `DocAttachFlowForPurchaseHeaderVendorChange`

## DocAttachFlowForPurchaseLineInsert

[Line 968](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L968), local.

- [989](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L989) calls `CopyAttachments`

## DocAttachFlowForPurchaseLineItemChg

[Line 993](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L993), local.

- [1005](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1005) calls `DeleteAttachedDocuments`
- [1007](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1007) calls `DocAttachFlowForPurchaseLineInsert`

## DocAttachFlowForPurchQuoteToPurchOrder

[Line 1011](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1011), local.

- [1032](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1032) calls `CopyAttachments`

## DocAttachFlowForPurchQuoteToPurchOrderLines

[Line 1036](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1036), local.

- [1051](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1051) calls `CopyAttachments`

## DocAttachFlowForBlanketPurchaseHeader

[Line 1055](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1055), local.

- [1076](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1076) calls `DeleteAttachedDocuments`
- [1083](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1083) calls `CopyAttachments`

## DocAttachFlowForBlanketPurchaseLine

[Line 1087](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1087), local.

- [1108](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1108) calls `DeleteAttachedDocuments`
- [1114](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1114) calls `CopyAttachments`

## DeleteAttachedDocumentsOnAfterDeleteItem

[Line 1118](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1118), local.

- [1123](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1123) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteResource

[Line 1127](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1127), local.

- [1132](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1132) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteJob

[Line 1136](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1136), local.

- [1141](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1141) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteEmployee

[Line 1145](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1145), local.

- [1150](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1150) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteFixedAsset

[Line 1154](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1154), local.

- [1159](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1159) calls `DeleteAttachedDocuments`

## DeleteAttachedDocumentsOnAfterDeleteOpportunity

[Line 1163](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1163), local.

- [1168](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1168) calls `DeleteAttachedDocuments`

## MoveAttachedDocumentsOnAfterRenameCustomer

[Line 1172](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1172), local.

- [1181](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1181) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameVendor

[Line 1185](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1185), local.

- [1194](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1194) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameItem

[Line 1198](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1198), local.

- [1207](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1207) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameEmployee

[Line 1211](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1211), local.

- [1220](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1220) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameFixedAsset

[Line 1224](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1224), local.

- [1233](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1233) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameResource

[Line 1237](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1237), local.

- [1246](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1246) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameJob

[Line 1250](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1250), local.

- [1259](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1259) calls `MoveAttachmentsWithinSameRecordType`

## MoveAttachedDocumentsOnAfterRenameOpportunity

[Line 1263](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1263), local.

- [1272](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1272) calls `MoveAttachmentsWithinSameRecordType`

## IsDuplicateFile

[Line 1276](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1276).

- [1286](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1286) raises `OnIsDuplicateFileOnAfterSetFilters`

## CopyAttachments

[Line 1304](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1304).

- [1320](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1320) raises `OnBeforeCopyAttachments`
- [1362](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1362) raises `OnCopyAttachmentsOnAfterSetFromParameters`
- [1379](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1379) raises `OnCopyAttachmentsOnAfterSetDocumentFlowFilter`
- [1406](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1406) raises `OnCopyAttachmentsOnAfterSetToParameters`
- [1409](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1409) calls `SkipDuplicateToDocumentAttachmentIDOnCopyFromOrderToInvoice`
- [1414](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1414) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Table ID`
- [1415](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1415) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `No.`
- [1420](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1420) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Document Type`
- [1424](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1424) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Document Type`
- [1425](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1425) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Line No.`
- [1428](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1428) raises `OnCopyAttachmentsOnAfterSetToDocumentFilters`
- [1430](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1430) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) Insert(true)
- [1437](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1437) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) Modify

## SkipDuplicateToDocumentAttachmentIDOnCopyFromOrderToInvoice

[Line 1446](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1446), local.

- [1454](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1454) calls `TableIsDocumentHeader`
- [1463](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1463) calls `TableIsDocumentLine`

## TableIsDocumentHeader

[Line 1480](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1480), local.

- [1483](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1483) raises `OnAfterTableIsDocumentHeader`

## TableIsDocumentLine

[Line 1486](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1486), local.

- [1489](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1489) raises `OnAfterTableIsDocumentLine`

## CopyAttachmentsForPostedDocs

[Line 1492](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1492).

- [1504](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1504) raises `OnBeforeCopyAttachmentsForPostedDocsLines`, IsHandled
- [1512](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1512) calls `TransformAttachmentDocumentTypeValue`
- [1525](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1525) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Table ID`
- [1529](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1529) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `No.`
- [1530](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1530) calls `SetDocumentTypeForPostedDocument`
- [1531](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1531) raises `OnCopyAttachmentsForPostedDocsOnBeforeToDocumentAttachmentInsert`
- [1532](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1532) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) Insert(true)
- [1533](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1533) raises `OnCopyAttachmentsForPostedDocsOnAfterToDocumentAttachmentInsert`
- [1536](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1536) calls `CopyAttachmentsForPostedDocsLines`

## CopyAttachmentsForPostedDocsLines

[Line 1539](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1539).

- [1555](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1555) calls `TransformAttachmentDocumentTypeValue`
- [1569](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1569) raises `OnCopyAttachmentsForPostedDocsLinesOnAfterSetFromFilters`
- [1575](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1575) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Table ID`
- [1577](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1577) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Table ID`
- [1579](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1579) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Table ID`
- [1581](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1581) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Table ID`
- [1583](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1583) raises `OnCopyAttachmentsForPostedDocsLinesOnAfterSetToTableID`
- [1585](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1585) calls `SetDocumentTypeForPostedDocument`
- [1586](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1586) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `No.`
- [1588](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1588) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) Insert(true)

## SetDocumentTypeForPostedDocument

[Line 1592](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1592), local.

- [1596](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1596) raises `OnBeforeSetDocumentTypeForPostedDocument`, IsHandled
- [1603](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1603) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Document Type`
- [1606](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1606) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `Document Type`

## MoveAttachmentsWithinSameRecordType

[Line 1612](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1612).

- [1628](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1628) calls `TableIsEntity`
- [1647](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1647) validates [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `No.`
- [1648](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1648) raises `OnMoveAttachmentsWithinSameRecordTypeOnBeforeInsert`
- [1649](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1649) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) Insert(true)
- [1653](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1653) writes [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) DeleteAll(true)

## TableIsEntity

[Line 1656](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1656), local.

- [1668](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1668) raises `OnAfterTableIsEntity`

## ShowNotification

[Line 1671](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1671).

- [1674](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1674) calls `ShowDocPrintedToAttachmentNotification`
- [1676](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1676) calls `ShowNotFoundPrintableReportsNotification`

## ShowDocPrintedToAttachmentNotification

[Line 1679](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1679).

- [1687](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1687) calls [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `InitFieldsFromRecRef`
- [1688](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1688) calls `GetNotificationId`
- [1696](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1696) calls [Codeunit 1511 Notification Lifecycle Mgt.](https://jonas-paprotka.de/ref/codeunit/1511-notification-lifecycle-mgt/) `SendNotificationWithAdditionalContext`
- [1697](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1697) calls `GetNotificationId`

## ShowNotFoundPrintableReportsNotification

[Line 1700](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1700).

- [1708](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1708) calls [Table 1173 Document Attachment](https://jonas-paprotka.de/ref/table/1173-document-attachment/) `InitFieldsFromRecRef`
- [1709](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1709) calls `GetNoPritableReportsNotificationId`
- [1712](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1712) calls [Codeunit 1511 Notification Lifecycle Mgt.](https://jonas-paprotka.de/ref/codeunit/1511-notification-lifecycle-mgt/) `SendNotification`

## ShowDocumentAttachments

[Line 1725](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1725).

- [1738](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1738) runs [Page 1173 Document Attachment Details](https://jonas-paprotka.de/ref/page/1173-document-attachment-details/)

## DeleteAttachedDocuments

[Line 1741](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1741).

- [1747](https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/source/#L1747) calls `DeleteAttachedDocumentsWithConfirm`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
