---
id: object/table/133
type: object
title: Table 133 "Incoming Document Attachment"
summary: Table 133 "Incoming Document Attachment" in Base Application (Microsoft.EServices.EDocument). 22 fields, 21 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 53d1abc2bc15937e62e048166f9f95a2d5326ad2714e67af2c5519a243f56a63
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocumentAttachment.Table.al
    title: src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocumentAttachment.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 133
name: Incoming Document Attachment
namespace: Microsoft.EServices.EDocument
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 22
  procedures: 39
  events: 9
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 1
  extended_by: 1
  event_subscribers: 7
  calls: 10
  called_by: 0
  implements: 0
---

# Table 133 "Incoming Document Attachment"

> Table 133 "Incoming Document Attachment" in Base Application (Microsoft.EServices.EDocument). 22 fields, 21 public procedures, 9 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28.

Base Application · Microsoft.EServices.EDocument · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocumentAttachment.Table.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Incoming Document Attachment |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Incoming Document Entry No. | Integer | — | TableRelation [Table 130 "Incoming Document"](../table/130.md) (Incoming Document) |
| 2 | Line No. | Integer | — |  |
| 3 | Created Date-Time | DateTime | — |  |
| 4 | Created By User Name | Code[50] | — | DataClassification EndUserIdentifiableInformation |
| 5 | Name | Text[250] | — |  |
| 6 | Type | Option | — | OptionCaption: ,Image,PDF,Word,Excel,PowerPoint,Email,XML,Other |
| 7 | File Extension | Text[30] | — |  |
| 8 | Content | BLOB | Specifies the content of the attachment. |  |
| 9 | Document No. | Code[20] | — |  |
| 10 | Posting Date | Date | — |  |
| 11 | Document Table No. Filter | Integer | — | FlowFilter |
| 12 | Document Type Filter | Enum "Incoming Document Type" | — | FlowFilter; enum [Enum 133 "Incoming Document Type"](../enum/133.md) |
| 13 | Document No. Filter | Code[20] | — | FlowFilter |
| 14 | Journal Template Name Filter | Code[20] | — | FlowFilter |
| 15 | Journal Batch Name Filter | Code[20] | — | FlowFilter |
| 16 | Journal Line No. Filter | Integer | — | FlowFilter |
| 17 | Default | Boolean | — |  |
| 18 | Use for OCR | Boolean | — |  |
| 19 | External Document Reference | Text[50] | — |  |
| 20 | OCR Service Document Reference | Text[50] | — |  |
| 21 | Generated from OCR | Boolean | — | not editable |
| 22 | Main Attachment | Boolean | — |  |

## Keys

- Key1: Incoming Document Entry No., Line No. (clustered)
- Key2: Document No., Posting Date

## Events published

- `OnAttachBinaryFile()` (integration)
  - subscribers: [Codeunit 1520 "Workflow Event Handling"](../codeunit/1520.md) RunWorkflowOnBinaryFileAttached
- `OnGetBinaryContent(var TempBlob: Codeunit "Temp Blob"; IncomingDocumentEntryNo: Integer)` (integration)
- `OnBeforeExtractHeaderFields(var TempFieldBuffer: Record "Field Buffer" temporary; var IncomingDocument: Record "Incoming Document")` (integration)
- `OnBeforeExport(var IncomingDocumentAttachment: Record "Incoming Document Attachment")` (integration)
- `OnBeforeSetFiltersFromMainRecord(var MainRecordRef: RecordRef; var IncomingDocumentAttachment: Record "Incoming Document Attachment"; var IsHandled: Boolean)` (integration)
  - subscribers: [Codeunit 6468 "Serv. Doc. Exchange Mgt."](../codeunit/6468.md) OnBeforeSetFiltersFromMainRecord
- `OnAfterSetValueOnExtractHeaderField(var IncomingDocument: Record "Incoming Document"; FieldNumber: Integer)` (integration)
- `OnBeforeFindDataExchType(var IncomingDocumentAttachment: Record "Incoming Document Attachment"; var IsHandled: Boolean)` (integration)
- `OnBeforeNewAttachment(var IncomingDocumentAttachment: Record "Incoming Document Attachment"; var IsHandled: Boolean)` (integration)
- `OnBeforeImport(var IncomingDocumentAttachment: Record "Incoming Document Attachment"; var IsImported: Boolean; var IsHandled: Boolean)` (integration)

## Trigger event subscribers

- OnAfterDeleteEvent: [Codeunit 5509 "Graph Mgt - Inc Doc Attachment"](../codeunit/5509.md) HandleOnAfterDelete
- OnAfterInsertEvent: [Codeunit 5509 "Graph Mgt - Inc Doc Attachment"](../codeunit/5509.md) HandleOnAfterInsert
- OnAfterModifyEvent: [Codeunit 5509 "Graph Mgt - Inc Doc Attachment"](../codeunit/5509.md) HandleOnAfterUpdate
- OnAfterRenameEvent: [Codeunit 5509 "Graph Mgt - Inc Doc Attachment"](../codeunit/5509.md) HandleOnAfterRename
- OnBeforeDeleteEvent: [Codeunit 5579 "Digital Voucher Impl."](../codeunit/5579.md) CheckIncomingDocumentOnBeforeDeleteEvent

## Procedures

- `NewAttachment()`
- `NewAttachmentFromGenJnlLine(GenJournalLine: Record "Gen. Journal Line")`
- `NewAttachmentFromSalesDocument(SalesHeader: Record "Sales Header")`
- `NewAttachmentFromPurchaseDocument(PurchaseHeader: Record "Purchase Header")`
- `NewAttachmentFromDocument(EntryNo: Integer; TableID: Integer; DocumentType: Option; DocumentNo: Code[20])`
- `NewAttachmentFromPurchaseDocument(PurchaseHeader: Record "Purchase Header"; FileName: Text[250]; var TempBlob: Codeunit "Temp Blob")`
- `NewAttachmentFromDocument(EntryNo: Integer; TableID: Integer; DocumentType: Option; DocumentNo: Code[20]; FileName: Text[250]; var TempBlob: Codeunit "Temp Blob")`
- `NewAttachmentFromPostedDocument(DocumentNo: Code[20]; PostingDate: Date)`
- `Import(): Boolean`
- `Import(RethrowError: Boolean): Boolean`
- `Export(DefaultFileName: Text; ShowFileDialog: Boolean): Text`
- `GetContent(var TempBlob: Codeunit "Temp Blob"): Boolean`
- `DeleteAttachment()`
- `SendToOCR()`
- `GetFullName(): Text`
- `ExtractHeaderFields(var XMLRootNode: DotNet XmlNode; var IncomingDocument: Record "Incoming Document")`
- `SetFiltersFromMainRecord(var MainRecordRef: RecordRef; var IncomingDocumentAttachment: Record "Incoming Document Attachment")`
- `AddFieldToFieldBuffer(var TempFieldBuffer: Record "Field Buffer" temporary; FieldID: Integer)`
- `SendNotifActionCompleted()`
- `SetContentFromBlob(TempBlob: Codeunit "Temp Blob")`
- `SupportedByFileViewer(): Boolean` (internal)

Plus 9 local procedures.

## Triggers

OnDelete, OnInsert, OnModify

## Relations

- Incoming Document Entry No.: TableRelation [Table 130 "Incoming Document"](../table/130.md)

## Pages and codeunits on this table

- [Page 2123 "O365 Incoming Doc. Att. Pict."](../page/2123.md) (source table)
- [Codeunit 1215 "Data Exch. Type Selector"](../codeunit/1215.md) (codeunit runs on it)
- [Codeunit 134 "Import Attachment - Inc. Doc."](../codeunit/134.md) (codeunit runs on it)

## Extended by

- [Table extension 5582 "Dig. Voucher Inc. Doc. Attach."](../tableextension/5582.md)

## 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) (8 calls: `GetContent → FromRecord`, `GetContent → HasValue`, `SendToOCR → FromRecord`, …)
- [Codeunit 6224 "XML DOM Management"](../codeunit/6224.md) (3 calls: `ExtractHeaderField → AddNamespaces`, `ExtractHeaderField → FindNodeTextNs`, `UpdateIncomingDocumentHeaderFields → LoadXMLNodeFromInStream`)
- [Codeunit 1173 "Document Attachment Mgmt"](../codeunit/1173.md) (2 calls: `SupportedByFileViewer → IsSupportedByFileViewerExtension`, `SupportedByFileViewer → IsSupportedByFileViewerFileName`)
- [Codeunit 1294 "OCR Service Mgt."](../codeunit/1294.md) (2 calls: `ExtractHeaderField → DateConvertYYYYMMDD2XML`, `SendToOCR → UploadAttachment`)
- [Codeunit 500 "Enum Assignment Management"](../codeunit/500.md) (2 calls: `SetFiltersFromMainRecord → GetPurchIncomingDocumentType`, `SetFiltersFromMainRecord → GetSalesIncomingDocumentType`)
- [Codeunit 1203 "Import XML File to Data Exch."](../codeunit/1203.md) (1 call: `ExtractHeaderField → EscapeMissingNamespacePrefix`)
- [Codeunit 1215 "Data Exch. Type Selector"](../codeunit/1215.md) (1 call: `FindDataExchType → (object)`)
- [Codeunit 134 "Import Attachment - Inc. Doc."](../codeunit/134.md) (1 call: `NewAttachment → (object)`)
- [Codeunit 419 "File Management"](../codeunit/419.md) (1 call: `Export → BLOBExport`)
- [Codeunit 701 "Data Type Management"](../codeunit/701.md) (1 call: `SetFiltersFromMainRecord → FindFieldByName`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26, BC28

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: "table", object_name: "Incoming Document Attachment")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
