{"title":"Table 133 Incoming Document Attachment, extension points 29","url":"https://jonas-paprotka.de/ref/table/133-incoming-document-attachment/points/","author":"JOP-AL","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/","subject":"Microsoft Dynamics 365 Business Central","checked":"2026-11-20","changed":"2026-10-05","object":{"type":"table","id":133,"name":"Incoming Document Attachment","app":"Base Application","url":"https://jonas-paprotka.de/ref/table/133-incoming-document-attachment/"},"major":29,"source":{"url":"https://jonas-paprotka.de/ref/table/133-incoming-document-attachment/source/","path":"src/Layers/W1/BaseApp/eServices/EDocument/IncomingDocumentAttachment.Table.al","commit":"4303e5e584d3aa5d9e98cbc615525a5396ad6ed7","lines":"a line is <source url>#L<line>"},"steps":{"event":"[line, \"event\", name, handled]: raises an event of this object; handled 1 when it has an IsHandled parameter","call":"[line, \"call\", name, arguments]: calls a procedure of this object","ext":"[line, \"ext\", type, id, name, arguments]: calls a procedure of another object, through a variable declared with that type","write":"[line, \"write\", table id, method, 1 when called with true]: Insert, Modify, ModifyAll, Delete, DeleteAll or Rename","validate":"[line, \"validate\", table id, field name]","run":"[line, \"run\", type, id]: Codeunit.Run, Page.Run, Report.Run and their kin"},"objects":{"codeunit:134":{"name":"Import Attachment - Inc. Doc.","url":"https://jonas-paprotka.de/ref/codeunit/134-import-attachment-inc-doc/"},"codeunit:419":{"name":"File Management","url":"https://jonas-paprotka.de/ref/codeunit/419-file-management/"},"codeunit:4100":{"name":"Temp Blob","url":"https://jonas-paprotka.de/ref/codeunit/4100-temp-blob/"},"table:133":{"name":"Incoming Document Attachment","url":"https://jonas-paprotka.de/ref/table/133-incoming-document-attachment/"},"codeunit:1294":{"name":"OCR Service Mgt.","url":"https://jonas-paprotka.de/ref/codeunit/1294-ocr-service-mgt/"},"codeunit:1215":{"name":"Data Exch. Type Selector","url":"https://jonas-paprotka.de/ref/codeunit/1215-data-exch-type-selector/"},"codeunit:6224":{"name":"XML DOM Management","url":"https://jonas-paprotka.de/ref/codeunit/6224-xml-dom-management/"},"table:130":{"name":"Incoming Document","url":"https://jonas-paprotka.de/ref/table/130-incoming-document/"},"codeunit:1203":{"name":"Import XML File to Data Exch.","url":"https://jonas-paprotka.de/ref/codeunit/1203-import-xml-file-to-data-exch/"},"codeunit:500":{"name":"Enum Assignment Management","url":"https://jonas-paprotka.de/ref/codeunit/500-enum-assignment-management/"},"codeunit:701":{"name":"Data Type Management","url":"https://jonas-paprotka.de/ref/codeunit/701-data-type-management/"},"table:8450":{"name":"Field Buffer","url":"https://jonas-paprotka.de/ref/table/8450-field-buffer/"},"codeunit:1173":{"name":"Document Attachment Mgmt","url":"https://jonas-paprotka.de/ref/codeunit/1173-document-attachment-mgmt/"}},"procs":[{"name":"Default.OnValidate","line":128,"kind":"trigger","steps":[[131,"call","ClearDefaultAttachmentsFromIncomingDocument",0],[132,"call","FindDataExchType",0],[133,"call","UpdateIncomingDocumentHeaderFields",0],[135,"call","CheckDefault",0]]},{"name":"Main Attachment.OnValidate","line":166,"kind":"trigger","steps":[[168,"call","CheckMainAttachment",0]]},{"name":"OnInsert","line":208,"kind":"trigger","steps":[[214,"call","SetFirstAttachmentAsDefault",0],[215,"call","SetFirstAttachmentAsMain",0],[217,"call","CheckDefault",0],[218,"call","CheckMainAttachment",0]]},{"name":"OnModify","line":221,"kind":"trigger","steps":[[223,"call","CheckDefault",0],[224,"call","CheckMainAttachment",0]]},{"name":"NewAttachment","line":232,"kind":"procedure","params":0,"steps":[[237,"event","OnBeforeNewAttachment",1],[241,"run","codeunit",134]]},{"name":"NewAttachmentFromGenJnlLine","line":245,"kind":"procedure","params":1,"steps":[[254,"call","NewAttachment",0]]},{"name":"NewAttachmentFromSalesDocument","line":257,"kind":"procedure","params":1,"steps":[[259,"call","NewAttachmentFromDocument",4]]},{"name":"NewAttachmentFromPurchaseDocument","line":266,"kind":"procedure","params":1,"steps":[[268,"call","NewAttachmentFromDocument",4]]},{"name":"NewAttachmentFromDocument","line":275,"kind":"procedure","params":4,"steps":[[277,"call","ApplyFiltersForDocument",4],[278,"call","NewAttachment",0],[279,"call","SendNotifActionCompleted",0]]},{"name":"NewAttachmentFromPurchaseDocument","line":282,"kind":"procedure","params":3,"steps":[[284,"call","NewAttachmentFromDocument",6]]},{"name":"NewAttachmentFromDocument","line":293,"kind":"procedure","params":6,"steps":[[297,"call","ApplyFiltersForDocument",4],[298,"ext","codeunit",134,"ImportAttachment",3],[300,"call","SendNotifActionCompleted",0]]},{"name":"NewAttachmentFromPostedDocument","line":312,"kind":"procedure","params":2,"steps":[[316,"call","NewAttachment",0],[318,"call","SendNotifActionCompleted",0]]},{"name":"Import","line":321,"kind":"procedure","params":0,"steps":[[327,"event","OnBeforeImport",1]]},{"name":"Import","line":334,"kind":"procedure","params":1,"steps":[[336,"run","codeunit",134]]},{"name":"Export","line":346,"kind":"procedure","params":2,"steps":[[351,"event","OnBeforeExport",0],[353,"call","GetContent",1],[359,"ext","codeunit",419,"BLOBExport",3]]},{"name":"GetContent","line":362,"kind":"procedure","params":1,"steps":[[367,"event","OnGetBinaryContent",0],[368,"ext","codeunit",4100,"HasValue",0],[369,"ext","codeunit",4100,"FromRecord",2],[370,"ext","codeunit",4100,"HasValue",0]]},{"name":"DeleteAttachment","line":373,"kind":"procedure","params":0,"steps":[[387,"write",133,"Delete"]]},{"name":"ClearDefaultAttachmentsFromIncomingDocument","line":407,"kind":"procedure","access":"local","params":0,"steps":[[413,"write",133,"ModifyAll"]]},{"name":"SendToOCR","line":417,"kind":"procedure","params":0,"steps":[[424,"event","OnGetBinaryContent",0],[425,"ext","codeunit",4100,"HasValue",0],[426,"ext","codeunit",4100,"FromRecord",2],[430,"write",133,"Modify"],[432,"ext","codeunit",1294,"UploadAttachment",5]]},{"name":"FindDataExchType","line":456,"kind":"procedure","access":"local","params":0,"steps":[[461,"event","OnBeforeFindDataExchType",1],[468,"run","codeunit",1215]]},{"name":"UpdateIncomingDocumentHeaderFields","line":471,"kind":"procedure","access":"local","params":0,"steps":[[481,"event","OnGetBinaryContent",0],[482,"ext","codeunit",4100,"HasValue",0],[483,"ext","codeunit",4100,"FromRecord",2],[485,"ext","codeunit",4100,"CreateInStream",1],[486,"ext","codeunit",6224,"LoadXMLNodeFromInStream",2],[490,"call","ExtractHeaderFields",2]]},{"name":"ExtractHeaderFields","line":494,"kind":"procedure","params":2,"steps":[[498,"call","AddFieldToFieldBuffer",2],[499,"call","AddFieldToFieldBuffer",2],[500,"call","AddFieldToFieldBuffer",2],[501,"call","AddFieldToFieldBuffer",2],[502,"call","AddFieldToFieldBuffer",2],[503,"call","AddFieldToFieldBuffer",2],[504,"call","AddFieldToFieldBuffer",2],[505,"call","AddFieldToFieldBuffer",2],[506,"call","AddFieldToFieldBuffer",2],[507,"call","AddFieldToFieldBuffer",2],[508,"call","AddFieldToFieldBuffer",2],[509,"call","AddFieldToFieldBuffer",2],[510,"call","AddFieldToFieldBuffer",2],[511,"call","AddFieldToFieldBuffer",2],[512,"call","AddFieldToFieldBuffer",2],[513,"call","AddFieldToFieldBuffer",2],[515,"event","OnBeforeExtractHeaderFields",0],[520,"call","ExtractHeaderField",3]]},{"name":"ExtractHeaderField","line":524,"kind":"procedure","access":"local","params":3,"steps":[[540,"ext","table",130,"GetDataExchangePath",1],[543,"ext","codeunit",1203,"EscapeMissingNamespacePrefix",1],[546,"ext","codeunit",6224,"AddNamespaces",2],[547,"ext","codeunit",6224,"FindNodeTextNs",3],[556,"ext","codeunit",1294,"DateConvertYYYYMMDD2XML",1],[570,"event","OnAfterSetValueOnExtractHeaderField",0],[571,"write",130,"Modify"]]},{"name":"SetFirstAttachmentAsDefault","line":590,"kind":"procedure","access":"local","params":0,"steps":[[598,"validate",133,"Default"]]},{"name":"SetFirstAttachmentAsMain","line":602,"kind":"procedure","access":"local","params":0,"steps":[[610,"validate",133,"Main Attachment"]]},{"name":"SetFiltersFromMainRecord","line":614,"kind":"procedure","params":2,"steps":[[628,"event","OnBeforeSetFiltersFromMainRecord",1],[639,"ext","codeunit",500,"GetSalesIncomingDocumentType",1],[646,"ext","codeunit",500,"GetPurchIncomingDocumentType",1],[658,"ext","codeunit",701,"FindFieldByName",3],[659,"ext","codeunit",701,"FindFieldByName",3],[661,"ext","codeunit",701,"FindFieldByName",3]]},{"name":"AddFieldToFieldBuffer","line":670,"kind":"procedure","params":2,"steps":[[676,"write",8450,"Insert"]]},{"name":"SetContentFromBlob","line":689,"kind":"procedure","params":1,"steps":[[694,"ext","codeunit",4100,"ToRecordRef",2]]},{"name":"SupportedByFileViewer","line":698,"kind":"procedure","access":"internal","params":0,"steps":[[708,"ext","codeunit",1173,"IsSupportedByFileViewerExtension",2],[710,"ext","codeunit",1173,"IsSupportedByFileViewerFileName",2]]}]}