---
id: object/codeunit/5503
type: object
title: Codeunit 5503 "Graph Mgt - Attachment Buffer"
summary: Codeunit 5503 "Graph Mgt - Attachment Buffer" in Base Application (Microsoft.Integration.Graph). 27 public procedures. Present since at least BC23, still in BC30, changed in BC25.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "25"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 5065088064533df59fa052389b86bc3f3ae29eaf93357882089f41e912908472
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Graph/GraphMgtAttachmentBuffer.Codeunit.al
    title: src/Layers/W1/BaseApp/Integration/Graph/GraphMgtAttachmentBuffer.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 5503
name: Graph Mgt - Attachment Buffer
namespace: Microsoft.Integration.Graph
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 79
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 8
  called_by: 4
  implements: 0
---

# Codeunit 5503 "Graph Mgt - Attachment Buffer"

> Codeunit 5503 "Graph Mgt - Attachment Buffer" in Base Application (Microsoft.Integration.Graph). 27 public procedures. Present since at least BC23, still in BC30, changed in BC25.

Base Application · Microsoft.Integration.Graph · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Integration/Graph/GraphMgtAttachmentBuffer.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Incoming Document Attachment" = rimd, tabledata "Tenant Media" = r |

## Procedures

- `LoadDocumentAttachments(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; DocumentFilter: Text)`
- `ConvertDocumentTypeToDocumentAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var DocumentAttachment: Record "Document Attachment")`
- `LoadAttachments(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; DocumentIdFilter: Text; AttachmentIdFilter: Text)`
- `LoadAttachmentsWithDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; DocumentIdFilter: Text; AttachmentIdFilter: Text; DocumentTypeFilter: Text)`
- `LoadAttachmentsWithoutDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; AttachmentIdFilter: Text)`
- `PropagateInsertAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateInsertAttachmentSafe(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateInsertAttachmentSafeWithDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateInsertAttachmentSafeWithoutDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateModifyAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateModifyAttachmentWithDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateModifyAttachmentWithoutDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `PropagateDeleteAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary)`
- `PropagateDeleteAttachmentWithDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary)`
- `PropagateDeleteAttachmentWithoutDocumentType(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary)`
- `DeleteLinkedAttachment(var IncomingDocumentAttachment: Record "Incoming Document Attachment"; var IncomingDocument: Record "Incoming Document")`
- `UpdateAttachments(var TempOldAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempNewAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; DocumentId: Guid)`
- `InsertFromTempAttachmentEntityBufferToDocumentAttachment(var DocumentAttachment: Record "Document Attachment"; var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `ModifyFromTempAttachmentEntityBufferToDocumentAttachment(var DocumentAttachment: Record "Document Attachment"; var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `SetDocumentAttachmentNo(var DocumentAttachment: Record "Document Attachment"; var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary)`
- `CopyAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var UnlinkedAttachment: Record "Unlinked Attachment"; GenerateNewId: Boolean)`
- `RegisterFieldSet(FieldNo: Integer; var TempFieldBuffer: Record "Field Buffer" temporary)`
- `GetDocumentIdFromAttachmentId(AttachmentId: Guid): Guid`
- `GetDocumentTypeFromAttachmentIdAndDocumentId(AttachmentId: Guid; DocumentId: Guid): Enum "Attachment Entity Buffer Document Type"`
- `TransferFromIncomingDocumentAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var IncomingDocumentAttachment: Record "Incoming Document Attachment")`
- `TransferFromUnlinkedAttachment(var TempAttachmentEntityBuffer: Record "Attachment Entity Buffer" temporary; var UnlinkedAttachment: Record "Unlinked Attachment")`
- `GetContentLength(var TempBlob: Codeunit "Temp Blob"): Integer`

Plus 52 local procedures.

## Triggers

OnRun

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 4100 "Temp Blob"](../codeunit/4100.md) (7 calls: `GetContentLength → CreateInStream`, `GetContentLength → HasValue`, `LoadAttachmentsToBuffer → FromRecord`, …)
- [Codeunit 419 "File Management"](../codeunit/419.md) (7 calls: `FileNameToNameAndExtension → GetExtension`, `FileNameToNameAndExtension → GetFileNameWithoutExtension`, `InsertFromTempAttachmentEntityBufferToDocumentAttachment → GetExtension`, …)
- [Codeunit 10 "Type Helper"](../codeunit/10.md) (3 calls: `FindParentDocumentSafe → Evaluate`, `TransferToIncomingDocumentAttachment → TransferFieldsWithValidate`, `TransferToUnlinkedAttachment → TransferFieldsWithValidate`)
- [Codeunit 5477 "Sales Invoice Aggregator"](../codeunit/5477.md) (3 calls: `FindParentDocumentSafe → GetSalesInvoiceHeaderFromId`, `FindParentDocumentWithDocumentTypeSafe → GetSalesInvoiceHeaderFromId`, `GetDocumentId → GetSalesInvoiceHeaderId`)
- [Codeunit 5529 "Purch. Inv. Aggregator"](../codeunit/5529.md) (3 calls: `FindParentDocumentSafe → GetPurchaseInvoiceHeaderFromId`, `FindParentDocumentWithDocumentTypeSafe → GetPurchaseInvoiceHeaderFromId`, `GetDocumentId → GetPurchaseInvoiceHeaderId`)
- [Codeunit 701 "Data Type Management"](../codeunit/701.md) (3 calls: `GetDocumentAttachmentDocumentId → FindFieldByName`, `GetGLEntryNo → FindFieldByName`, `SetDocumentAttachmentNo → FindFieldByName`)
- [Codeunit 5508 "Graph Mgt - Sal. Cr. Memo Buf."](../codeunit/5508.md) (2 calls: `FindParentDocumentWithDocumentTypeSafe → GetSalesCrMemoHeaderFromId`, `GetDocumentId → GetSalesCrMemoHeaderId`)
- [Codeunit 5511 "Graph Mgt - Purch. Cr. Memo"](../codeunit/5511.md) (2 calls: `FindParentDocumentWithDocumentTypeSafe → GetPurchaseCrMemoHeaderFromId`, `GetDocumentId → GetPurchaseCrMemoHeaderId`)

## Called by

- [Page 30039 "APIV2 - Attachments"](../page/30039.md) (12 calls: `ByteSizeFromContent → GetContentLength`, `OnDeleteRecord → PropagateDeleteAttachmentWithDocumentType`, `OnDeleteRecord → PropagateDeleteAttachmentWithoutDocumentType`, …)
- [Page 30080 "APIV2 - Document Attachments"](../page/30080.md) (10 calls: `ByteSizeFromContent → GetContentLength`, `OnDeleteRecord → PropagateDeleteAttachmentWithDocumentType`, `OnFindRecord → LoadDocumentAttachments`, …)
- [Page 20039 "APIV1 - Attachments"](../page/20039.md) (7 calls: `ByteSizeFromContent → GetContentLength`, `OnDeleteRecord → PropagateDeleteAttachment`, `OnFindRecord → GetDocumentIdFromAttachmentId`, …)
- [Page 20040 "APIV1 - G/L Entry Attachments"](../page/20040.md) (6 calls: `ByteSizeFromContent → GetContentLength`, `OnDeleteRecord → PropagateDeleteAttachment`, `OnFindRecord → LoadAttachments`, …)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Graph Mgt - Attachment Buffer")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
