Share via


Table "Document Attachment"

ID 1173
Namespace: Microsoft.Foundation.Attachment

Properties

Name Value
Caption Document Attachment
DataClassification CustomerContent

Fields

Name Type Description
ID Integer
"Table ID" Integer
"No." Code[20]
"Attached Date" DateTime
"File Name" Text[250]
"File Type" Enum Microsoft.Foundation.Attachment."Document Attachment File Type"
"File Extension" Text[30]
"Document Reference ID" Media
"Attached By" Guid
User Code[50]
"Document Flow Purchase" Boolean
"Document Flow Sales" Boolean
"Document Type" Enum Microsoft.Foundation.Attachment."Attachment Document Type"
"Line No." Integer
"VAT Report Config. Code" Enum Microsoft.Finance.VAT.Reporting."VAT Report Configuration"
"Document Flow Service" Boolean
"Document Flow Production" Boolean
SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemRowVersion BigInteger

Methods

ImportAttachment

procedure ImportAttachment(DocumentInStream: InStream, FileName: Text)

Parameters

Name Type Description
DocumentInStream InStream
FileName Text

Export

procedure Export(ShowFileDialog: Boolean): Text

Parameters

Name Type Description
ShowFileDialog Boolean

Returns

Type Description
Text

HasPostedDocumentAttachment

procedure HasPostedDocumentAttachment(Record: Variant): Boolean

Parameters

Name Type Description
Record Variant

Returns

Type Description
Boolean

SupportedByFileViewer

procedure SupportedByFileViewer(): Boolean

Returns

Type Description
Boolean

SaveAttachment

procedure SaveAttachment(RecRef: RecordRef, FileName: Text, TempBlob: Codeunit "Temp Blob")

Parameters

Name Type Description
RecRef RecordRef
FileName Text
TempBlob Codeunit System.Utilities."Temp Blob"

SaveAttachment

procedure SaveAttachment(RecRef: RecordRef, FileName: Text, TempBlob: Codeunit "Temp Blob", AllowDuplicateFileName: Boolean)

Parameters

Name Type Description
RecRef RecordRef
FileName Text
TempBlob Codeunit System.Utilities."Temp Blob"
AllowDuplicateFileName Boolean

SaveAttachment

procedure SaveAttachment(Files: List of [FileUpload], RecRef: RecordRef)

Parameters

Name Type Description
Files List of [FileUpload]
RecRef RecordRef

SaveAttachment

procedure SaveAttachment(Files: List of [FileUpload], RecRef: RecordRef, EncodingType: TextEncoding)

Parameters

Name Type Description
Files List of [FileUpload]
RecRef RecordRef
EncodingType TextEncoding

SaveAttachmentFromStream

procedure SaveAttachmentFromStream(DocStream: InStream, RecRef: RecordRef, FileName: Text)

Parameters

Name Type Description
DocStream InStream
RecRef RecordRef
FileName Text

SaveAttachmentFromStream

procedure SaveAttachmentFromStream(DocStream: InStream, RecRef: RecordRef, FileName: Text, AllowDuplicateFileName: Boolean)

Parameters

Name Type Description
DocStream InStream
RecRef RecordRef
FileName Text
AllowDuplicateFileName Boolean

InitFieldsFromRecRef

procedure InitFieldsFromRecRef(RecRef: RecordRef)

Parameters

Name Type Description
RecRef RecordRef

FindUniqueFileName

procedure FindUniqueFileName(FileName: Text, FileExtension: Text): Text[250]

Parameters

Name Type Description
FileName Text
FileExtension Text

Returns

Type Description
Text[250]

VATReturnSubmissionAttachmentsExist

procedure VATReturnSubmissionAttachmentsExist(VATReportHeader: Record "VAT Report Header"): Boolean

Parameters

Name Type Description
VATReportHeader Table Microsoft.Finance.VAT.Reporting."VAT Report Header"

Returns

Type Description
Boolean

VATReturnResponseAttachmentsExist

procedure VATReturnResponseAttachmentsExist(VATReportHeader: Record "VAT Report Header"): Boolean

Parameters

Name Type Description
VATReportHeader Table Microsoft.Finance.VAT.Reporting."VAT Report Header"

Returns

Type Description
Boolean

DownloadZipFileWithVATReturnSubmissionAttachments

procedure DownloadZipFileWithVATReturnSubmissionAttachments(VATRepConfigCode: Enum "VAT Report Configuration", VATReportNo: Code[20]): Boolean

Parameters

Name Type Description
VATRepConfigCode Enum Microsoft.Finance.VAT.Reporting."VAT Report Configuration"
VATReportNo Code[20]

Returns

Type Description
Boolean

DownloadZipFileWithVATReturnResponseAttachments

procedure DownloadZipFileWithVATReturnResponseAttachments(VATRepConfigCode: Enum "VAT Report Configuration", VATReportNo: Code[20]): Boolean

Parameters

Name Type Description
VATRepConfigCode Enum Microsoft.Finance.VAT.Reporting."VAT Report Configuration"
VATReportNo Code[20]

Returns

Type Description
Boolean

HasContent

procedure HasContent(): Boolean

Returns

Type Description
Boolean

ImportFromStream

procedure ImportFromStream(AttachmentInStream: InStream, FileName: Text)

Parameters

Name Type Description
AttachmentInStream InStream
FileName Text

ExportToStream

procedure ExportToStream(var AttachmentOutStream: OutStream)

Parameters

Name Type Description
AttachmentOutStream OutStream

GetAsTempBlob

procedure GetAsTempBlob(var TempBlob: Codeunit "Temp Blob")

Parameters

Name Type Description
TempBlob Codeunit System.Utilities."Temp Blob"

GetContentType

procedure GetContentType(): Text[100]

Returns

Type Description
Text[100]

ViewFile

procedure ViewFile()

OpenInOneDrive

procedure OpenInOneDrive(DocumentSharingIntent: Enum "Document Sharing Intent")

Parameters

Name Type Description
DocumentSharingIntent Enum System.Integration."Document Sharing Intent"

Events

OnBeforeHasContent

[IntegrationEvent(False,False)]
local procedure OnBeforeHasContent(var DocumentAttachment: Record "Document Attachment", var AttachmentIsAvailable: Boolean, var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
AttachmentIsAvailable Boolean
IsHandled Boolean

OnBeforeImportFromStream

[IntegrationEvent(False,False)]
local procedure OnBeforeImportFromStream(var DocumentAttachment: Record "Document Attachment", var AttachmentInStream: InStream, var FileName: Text, var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
AttachmentInStream InStream
FileName Text
IsHandled Boolean

OnBeforeExportToStream

[IntegrationEvent(False,False)]
local procedure OnBeforeExportToStream(var DocumentAttachment: Record "Document Attachment", var AttachmentOutStream: OutStream, var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
AttachmentOutStream OutStream
IsHandled Boolean

OnBeforeGetAsTempBlob

[IntegrationEvent(False,False)]
local procedure OnBeforeGetAsTempBlob(var DocumentAttachment: Record "Document Attachment", var TempBlob: Codeunit "Temp Blob", var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
TempBlob Codeunit System.Utilities."Temp Blob"
IsHandled Boolean

OnBeforeOpenInOneDrive

[IntegrationEvent(False,False)]
local procedure OnBeforeOpenInOneDrive(var Rec: Record "Document Attachment", DocumentSharingIntent: Enum "Document Sharing Intent", var IsHandled: Boolean)

Parameters

Name Type Description
Rec Table Microsoft.Foundation.Attachment."Document Attachment"
DocumentSharingIntent Enum System.Integration."Document Sharing Intent"
IsHandled Boolean

OnBeforeGetContentType

[IntegrationEvent(False,False)]
local procedure OnBeforeGetContentType(var Rec: Record "Document Attachment", var ContentType: Text[100], var IsHandled: Boolean)

Parameters

Name Type Description
Rec Table Microsoft.Foundation.Attachment."Document Attachment"
ContentType Text[100]
IsHandled Boolean

OnBeforeExport

[IntegrationEvent(False,False)]
local procedure OnBeforeExport(var DocumentAttachment: Record "Document Attachment", var IsHandled: Boolean, ShowFileDialog: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
IsHandled Boolean
ShowFileDialog Boolean

OnBeforeExportAttachment

[IntegrationEvent(False,False)]
local procedure OnBeforeExportAttachment(var DocumentAttachment: Record "Document Attachment")

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"

OnBeforeInsertAttachment

[IntegrationEvent(False,False)]
local procedure OnBeforeInsertAttachment(var DocumentAttachment: Record "Document Attachment", var RecRef: RecordRef)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
RecRef RecordRef

OnBeforeSaveAttachment

[IntegrationEvent(False,False)]
local procedure OnBeforeSaveAttachment(var DocumentAttachment: Record "Document Attachment", var RecRef: RecordRef, var FileName: Text, var TempBlob: Codeunit "Temp Blob")

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
RecRef RecordRef
FileName Text
TempBlob Codeunit System.Utilities."Temp Blob"

OnBeforeSaveAttachmentFromStream

[IntegrationEvent(False,False)]
local procedure OnBeforeSaveAttachmentFromStream(var DocumentAttachment: Record "Document Attachment", var RecRef: RecordRef, var FileName: Text, var DocStream: InStream)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
RecRef RecordRef
FileName Text
DocStream InStream

OnAfterInitFieldsFromRecRef

[IntegrationEvent(False,False)]
local procedure OnAfterInitFieldsFromRecRef(var DocumentAttachment: Record "Document Attachment", var RecRef: RecordRef)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
RecRef RecordRef

OnBeforeValidateDocumentFlowPurchase

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateDocumentFlowPurchase(var DocumentAttachment: Record "Document Attachment", xDocumentAttachment: Record "Document Attachment", var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
xDocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
IsHandled Boolean

OnBeforeValidateDocumentFlowSales

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateDocumentFlowSales(var DocumentAttachment: Record "Document Attachment", xDocumentAttachment: Record "Document Attachment", var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
xDocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
IsHandled Boolean

OnBeforeValidateDocumentFlowService

[IntegrationEvent(False,False)]
local procedure OnBeforeValidateDocumentFlowService(var DocumentAttachment: Record "Document Attachment", xDocumentAttachment: Record "Document Attachment", var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
xDocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
IsHandled Boolean

OnInsertOnBeforeCheckDocRefID

[IntegrationEvent(False,False)]
local procedure OnInsertOnBeforeCheckDocRefID(var DocumentAttachment: Record "Document Attachment", var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
IsHandled Boolean

OnInsertAttachmentOnBeforeImportStream

[IntegrationEvent(False,False)]
local procedure OnInsertAttachmentOnBeforeImportStream(var DocumentAttachment: Record "Document Attachment", DocInStream: InStream, FileName: Text, var IsHandled: Boolean)

Parameters

Name Type Description
DocumentAttachment Table Microsoft.Foundation.Attachment."Document Attachment"
DocInStream InStream
FileName Text
IsHandled Boolean

OnAfterIsPostedDocument

[IntegrationEvent(False,False)]
local procedure OnAfterIsPostedDocument(TableID: Integer, var Posted: Boolean)

Parameters

Name Type Description
TableID Integer
Posted Boolean

See also