Table 1173 "Document Attachment"
Base Application · Microsoft.Foundation.Attachment
Across versions
- BC23present
- BC242 events changed, 1 fields added
- BC253 procedures added, 1 events added
- BC262 procedures added, 1 fields added
- BC27-28unchanged
- BC299 fields changed
- BC30unchanged
Neighbourhood 23 connected objects and pages
Base Application · Microsoft.Foundation.Attachment · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Caption | 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 | ID | Integer | — | not editable; AutoIncrement |
| 2 | Table ID | Integer | Specifies the table ID the attachment belongs to. via Page 8751 “Document Attachment - External” | TableRelation AllObjWithCaption.“Object ID” where(“Object Type” = const(Table)); NotBlank |
| 3 | No. | Code[20] | Specifies the record number the attachment belongs to. via Page 8751 “Document Attachment - External” | NotBlank |
| 4 | Attached Date Δ BC29 | DateTime | Specifies the date when the document was attached. | |
| 5 | File Name Δ BC29 | Text[250] | Specifies the filename of the attachment. | NotBlank |
| 6 | File Type Δ BC29 | Enum “Document Attachment File Type” | Specifies the type of document that the attachment is. | enum Enum 1174 “Document Attachment File Type” |
| 7 | File Extension Δ BC29 | Text[30] | Specifies the file extension of the attachment. | |
| 8 | Document Reference ID | Media | — | |
| 9 | Attached By | Guid | Specifies the user who attached the file. via Page 8751 “Document Attachment - External” | TableRelation User.“User Security ID” where(“License Type” = const(“Full User”)); not editable |
| 10 | User Δ BC29 | Code[50] | Specifies the user who attached the document. | FlowField: lookup(User.“User Name” where(“User Security ID” = field(“Attached By”), “License Type” = const(“Full User”))); not editable |
| 11 | Document Flow Purchase Δ BC29 | Boolean | Specifies if the attachment must flow to transactions. | |
| 12 | Document Flow Sales Δ BC29 | Boolean | Specifies if the attachment must flow to transactions. | |
| 13 | Document Type | Enum “Attachment Document Type” | — | enum Enum 1173 “Attachment Document Type” |
| 14 | Line No. | Integer | — | |
| 15 | VAT Report Config. Code | Enum “VAT Report Configuration” | — | TableRelation Table 746 “VAT Reports Configuration” (“VAT Reports Configuration”.“VAT Report Type”); enum Enum 740 “VAT Report Configuration” |
| 20 | Document Flow Service + BC24 Δ BC29 | Boolean | Specifies if the attachment must flow to transactions. | |
| 21 | Document Flow Production + BC26 Δ BC29 | Boolean | Specifies if the attachment must flow to transactions. |
Keys
- Key1: Table ID, No., Document Type, Line No., ID (clustered)
- Key2: Document Reference ID
Events published
OnBeforeHasContent(var DocumentAttachment: Record "Document Attachment"; var AttachmentIsAvailable: Boolean; var IsHandled: Boolean)(integration)- subscribers: Codeunit 8751 “DA External Storage Impl.” DocumentAttachment_OnBeforeHasContent
OnBeforeImportFromStream(var DocumentAttachment: Record "Document Attachment"; var AttachmentInStream: InStream; var FileName: Text; var IsHandled: Boolean)(integration)- subscribers: Codeunit 6989 “Expense Attachment Mgt.” OnBeforeImportFromStream
OnBeforeExportToStream(var DocumentAttachment: Record "Document Attachment"; var AttachmentOutStream: OutStream; var IsHandled: Boolean)(integration)- subscribers: Codeunit 8751 “DA External Storage Impl.” DocumentAttachment_OnBeforeExportToStream
OnBeforeGetAsTempBlob(var DocumentAttachment: Record "Document Attachment"; var TempBlob: Codeunit "Temp Blob"; var IsHandled: Boolean)(integration)- subscribers: Codeunit 8751 “DA External Storage Impl.” DocumentAttachment_OnBeforeGetAsTempBlob
OnBeforeOpenInOneDrive(var Rec: Record "Document Attachment"; DocumentSharingIntent: Enum "Document Sharing Intent"; var IsHandled: Boolean)(integration)- subscribers: Codeunit 6989 “Expense Attachment Mgt.” OnBeforeOpenInOneDrive, Codeunit 8751 “DA External Storage Impl.” Document Attachment_OnBeforeOpenInOneDrive
OnBeforeGetContentType(var Rec: Record "Document Attachment"; var ContentType: Text[100]; var IsHandled: Boolean)(integration)- subscribers: Codeunit 8751 “DA External Storage Impl.” DocumentAttachment_OnBeforeGetContentType
OnBeforeExport(var DocumentAttachment: Record "Document Attachment"; var IsHandled: Boolean; ShowFileDialog: Boolean)(integration)OnBeforeExportAttachment(var DocumentAttachment: Record "Document Attachment")(integration)OnBeforeInsertAttachment(var DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef)(integration)- subscribers: Codeunit 20414 “Qlty. Attachment Integration” HandleOnBeforeInsertAttachment, Codeunit 6169 “E-Doc. Attachment Processor” OnBeforeInsertAttachmentForEDocs
OnBeforeSaveAttachment(var DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef; var FileName: Text; var TempBlob: Codeunit "Temp Blob")(integration)OnBeforeSaveAttachmentFromStream(var DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef; var FileName: Text; var DocStream: InStream)(integration)OnAfterInitFieldsFromRecRef(var DocumentAttachment: Record "Document Attachment"; var RecRef: RecordRef)(integration)- subscribers: Codeunit 6989 “Expense Attachment Mgt.” OnAfterInitFieldsFromRecRef, Codeunit 8059 “Sub. Contracts General Mgt.” InitDocumentAttachmentFields
OnBeforeValidateDocumentFlowPurchase(var DocumentAttachment: Record "Document Attachment"; xDocumentAttachment: Record "Document Attachment"; var IsHandled: Boolean)Δ BC24 (integration)OnBeforeValidateDocumentFlowSales(var DocumentAttachment: Record "Document Attachment"; xDocumentAttachment: Record "Document Attachment"; var IsHandled: Boolean)Δ BC24 (integration)OnBeforeValidateDocumentFlowService(var DocumentAttachment: Record "Document Attachment"; xDocumentAttachment: Record "Document Attachment"; var IsHandled: Boolean)+ BC24 (integration)OnInsertOnBeforeCheckDocRefID(var DocumentAttachment: Record "Document Attachment"; var IsHandled: Boolean)(integration)- subscribers: Codeunit 6907 “Expense Doc. Att. Subscribers” OnInsertOnBeforeCheckDocRefID, Codeunit 8751 “DA External Storage Impl.” Document Attachment_OnInsertOnBeforeCheckDocRefID
OnInsertAttachmentOnBeforeImportStream(var DocumentAttachment: Record "Document Attachment"; DocInStream: InStream; FileName: Text; var IsHandled: Boolean)(integration)OnAfterIsPostedDocument(TableID: Integer; var Posted: Boolean)+ BC25 (integration)- subscribers: Codeunit 6459 “Serv. Document Attachment Mgt.” OnInsertOrderTrackingEntry
Trigger event subscribers
- OnAfterDeleteEvent: Codeunit 6989 “Expense Attachment Mgt.” OnAfterDeleteEvent, Codeunit 8751 “DA External Storage Impl.” OnAfterDeleteDocumentAttachment
- OnAfterInsertEvent: Codeunit 6989 “Expense Attachment Mgt.” OnAfterInsertEvent, Codeunit 8751 “DA External Storage Impl.” OnAfterInsertDocumentAttachment
- OnAfterModifyEvent: Codeunit 6989 “Expense Attachment Mgt.” OnAfterModifyEvent
- OnBeforeDeleteEvent: Codeunit 6989 “Expense Attachment Mgt.” OnBeforeDeleteAttachment
Procedures
ImportAttachment(DocumentInStream: InStream; FileName: Text)Export(ShowFileDialog: Boolean): TextHasPostedDocumentAttachment(Record: Variant): BooleanSupportedByFileViewer(): Boolean+ BC26SaveAttachment(RecRef: RecordRef; FileName: Text; TempBlob: Codeunit "Temp Blob")+ BC25 + BC25SaveAttachment(RecRef: RecordRef; FileName: Text; TempBlob: Codeunit "Temp Blob"; AllowDuplicateFileName: Boolean)+ BC25 + BC25SaveAttachment(Files: List of [FileUpload]; RecRef: RecordRef)+ BC25 + BC25SaveAttachment(Files: List of [FileUpload]; RecRef: RecordRef; EncodingType: TextEncoding)+ BC25 + BC25SaveAttachmentFromStream(DocStream: InStream; RecRef: RecordRef; FileName: Text)SaveAttachmentFromStream(DocStream: InStream; RecRef: RecordRef; FileName: Text; AllowDuplicateFileName: Boolean)InitFieldsFromRecRef(RecRef: RecordRef)FindUniqueFileName(FileName: Text; FileExtension: Text): Text[250]VATReturnSubmissionAttachmentsExist(VATReportHeader: Record "VAT Report Header"): BooleanVATReturnResponseAttachmentsExist(VATReportHeader: Record "VAT Report Header"): BooleanDownloadZipFileWithVATReturnSubmissionAttachments(VATRepConfigCode: Enum "VAT Report Configuration"; VATReportNo: Code[20]): BooleanDownloadZipFileWithVATReturnResponseAttachments(VATRepConfigCode: Enum "VAT Report Configuration"; VATReportNo: Code[20]): BooleanHasContent(): BooleanImportFromStream(AttachmentInStream: InStream; FileName: Text)ExportToStream(var AttachmentOutStream: OutStream)GetAsTempBlob(var TempBlob: Codeunit "Temp Blob")GetContentType(): Text[100]ViewFile()+ BC26OpenInOneDrive(DocumentSharingIntent: Enum "Document Sharing Intent")
Plus 5 local procedures.
Triggers
OnInsert
Relations
- VAT Report Config. Code: TableRelation Table 746 “VAT Reports Configuration”
Referenced by
3 fields in 3 objects relate to this table (TableRelation or CalcFormula).
- Table 37 “Sales Line”: Attached Doc Count
- Table 39 “Purchase Line”: Attached Doc Count
- Table 8750 “DA External Storage Setup”: Has Uploaded Files
Pages and codeunits on this table
- Page 1173 “Document Attachment Details” (source table)
- Page 1178 “Doc. Attachment List Factbox” (source table)
- Page 6956 “Expense Picture” (source table)
- Page 8751 “Document Attachment - External” (source table)
Extended by
- Table extension 6160 “E-Doc. Attachment”
- Table extension 6902 “Exp. Document Attachment Ext”
- Table extension 8750 “Document Attachment Ext.Stor.”
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 1173 “Document Attachment Mgmt” (8 calls:
FindUniqueFileName → IsDuplicateFile,InitFieldsFromRecRef → TableHasDocTypePrimaryKey,InitFieldsFromRecRef → TableHasLineNumberPrimaryKey, …) - Codeunit 419 “File Management” (6 calls:
Export → BLOBExport,InsertAttachment → GetExtension,InsertAttachment → GetFileNameWithoutExtension, …) - Codeunit 4100 “Temp Blob” (5 calls:
DownloadZipFileWithVATReturnAttachments → CreateInStream,DownloadZipFileWithVATReturnAttachments → CreateOutStream,Export → CreateOutStream, …) - Codeunit 425 “Data Compression” (4 calls:
DownloadZipFileWithVATReturnAttachments → AddEntry,DownloadZipFileWithVATReturnAttachments → CloseZipArchive,DownloadZipFileWithVATReturnAttachments → CreateZipArchive, …) - Codeunit 9510 “Document Service Management” (3 calls:
OpenInOneDrive → EditInOneDriveFromMedia,OpenInOneDrive → OpenInOneDriveFromMedia,OpenInOneDrive → ShareWithOneDriveFromMedia)
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: "Document Attachment"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.