---
title: "Codeunit 6140 E-Doc. Import"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/6140-e-doc-import/
type: codeunit
id: 6140
name: "E-Doc. Import"
app: "E-Document Core"
namespace: Microsoft.eServices.EDocument
versions: "23-29"
build: 29.0.54011.55644
countries: "W1, DE, US"
source: "https://jonas-paprotka.de/ref/codeunit/6140-e-doc-import/source/?v=28 https://jonas-paprotka.de/ref/codeunit/6140-e-doc-import/source/"
checked: 2026-11-20
changed: 2026-10-16
subject: "Microsoft Dynamics 365 Business Central"
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/"
---

# Codeunit 6140 E-Doc. Import

JOP-AL, https://jonas-paprotka.de/ref/codeunit/6140-e-doc-import/

| | |
| --- | --- |
| App | E-Document Core |
| Namespace | Microsoft.eServices.EDocument |
| Versions | 23-29 |
| Minors | W1 23.0-29.0; DE 23.0-29.0; US 23.0-29.0, [every minor](https://jonas-paprotka.de/ref/codeunit/6140-e-doc-import/editions.json) |
| Source file | src/Processing/EDocImport.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| UploadDocument | (var EDocument: Record "E-Document") | - | internal | 23-29 | - | - |
| GetBasicInfo | (var EDocument: Record "E-Document") | - | internal | 23-25 | - | - |
| ProcessDocument | (var EDocument: Record "E-Document"; UpdateOrder: Boolean; CreateJnlLine: Boolean) | - | internal | 23 | - | - |
| ReceiveDocument | (EDocService: Record "E-Document Service") | - | internal | 23-25 | - | - |
| ProcessDocument | (var EDocument: Record "E-Document"; CreateJnlLine: Boolean) | - | internal | 24-25 | - | - |
| UpdatePurchaseOrderLink | (var EDocument: Record "E-Document") | - | internal | 24-29 | - | - |
| ProcessEDocPendingOrderMatch | (var EDocument: Record "E-Document") | - | internal | 24-25 | - | - |
| SetHideDialogs | (Hide: Boolean) | - | internal | 24-29 | - | - |
| ReceiveAndProcessAutomatically | (EDocumentService: Record "E-Document Service") | Boolean | public | 26-29 | - | - |
| ProcessAutomaticallyIncomingEDocument | (EDocument: Record "E-Document") | Boolean | public | 26-29 | - | - |
| ProcessIncomingEDocument | (EDocument: Record "E-Document"; EDocImportParameters: Record "E-Doc. Import Parameters") | Boolean | public | 26-29 | - | - |
| ProcessIncomingEDocument | (EDocument: Record "E-Document"; EDocumentService: Record "E-Document Service"; EDocImportParameters: Record "E-Doc. Import Parameters") | Boolean | internal | 26-29 | - | - |
| CreateFromType | (var EDocument: Record "E-Document"; EDocumentService: Record "E-Document Service"; EDocFileFormat: Enum "E-Doc. File Format"; Filename: Text; InStr: InStream) | - | internal | 26-29 | - | - |
| V1_GetBasicInfo | (var EDocument: Record "E-Document") | - | internal | 26-29 | - | - |
| V1_ProcessEDocument | (var EDocument: Record "E-Document"; CreateJnlLine: Boolean; AutoProcessDocument: Boolean) | - | internal | 26-29 | - | - |
| ViewExtractedData | (EDocument: Record "E-Document") | - | public | 26-29 | - | - |
| V1_ProcessImportedDocument | (var EDocument: Record "E-Document"; var EDocService: Record "E-Document Service"; var TempBlob: Codeunit "Temp Blob"; CreateJnlLine: Boolean; AutoProcessDocument: Boolean) | - | internal | 26-29 | - | - |
| V1_ProcessEDocPendingOrderMatch | (var EDocument: Record "E-Document") | - | internal | 26-29 | - | - |
| V1_AfterInsertImportedEdocument | (var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; var TempBlob: Codeunit "Temp Blob"; EDocCount: Integer; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage) | - | internal | 26-29 | - | - |
| V1_BeforeInsertImportedEdocument | (var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"; var TempBlob: Codeunit "Temp Blob"; EDocCount: Integer; var HttpRequest: HttpRequestMessage; var HttpResponse: HttpResponseMessage; var IsCreated: Boolean; var IsProcessed: Boolean) | - | internal | 26-29 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterProcessImportedDocument | (var EDocument: Record "E-Document"; var DocumentHeader: RecordRef) | 23-29 | - | - |
| Integration event | OnBeforePrepareReceivedDoc | (var EDocument: Record "E-Document"; var TempBlob: Codeunit "Temp Blob"; SourceDocumentHeader: RecordRef; SourceDocumentLine: RecordRef; TempEDocMapping: Record "E-Doc. Mapping" temporary) | 23-29 | - | - |
| Integration event | OnAfterPrepareReceivedDoc | (var EDocument: Record "E-Document"; var TempBlob: Codeunit "Temp Blob"; SourceDocumentHeader: RecordRef; SourceDocumentLine: RecordRef; TempEDocMapping: Record "E-Doc. Mapping" temporary) | 23-29 | - | - |
| Integration event | OnBeforeUpdateDocument | (var EDocument: Record "E-Document"; var TempDocumentHeader: RecordRef; var TempDocumentLine: RecordRef; var DocumentHeader: RecordRef) | 23-29 | Pending 27.0 | This event is not raised. |
| Integration event | OnAfterUpdateDocument | (var EDocument: Record "E-Document"; var TempDocumentHeader: RecordRef; var TempDocumentLine: RecordRef; var DocumentHeader: RecordRef) | 23-29 | Pending 27.0 | This event is not raised. |
| Integration event | OnBeforeCreateDocument | (var EDocument: Record "E-Document"; var TempDocumentHeader: RecordRef; var TempDocumentLine: RecordRef; var DocumentHeader: RecordRef) | 23-29 | - | - |
| Integration event | OnAfterCreateDocument | (var EDocument: Record "E-Document"; var TempDocumentHeader: RecordRef; var TempDocumentLine: RecordRef; var DocumentHeader: RecordRef) | 23-29 | - | - |
| Integration event | OnBeforeCreateJournalLine | (var EDocument: Record "E-Document"; var JnlLine: RecordRef) | 23-29 | - | - |
| Integration event | OnAfterCreateJournalLine | (var EDocument: Record "E-Document"; var JnlLine: RecordRef) | 23-29 | - | - |
| Integration event | OnAfterInsertImportedEdocument | (var EDocument: Record "E-Document"; EDocumentService: Record "E-Document Service"; var TempBlob: Codeunit "Temp Blob"; EDocCount: Integer; HttpRequest: HttpRequestMessage; HttpResponse: HttpResponseMessage) | 23-29 | Pending 26.0 | This event is removed. Use new IDocumentReceiver interface instead |
| Integration event | OnBeforeInsertImportedEdocument | (var EDocument: Record "E-Document"; EDocumentService: Record "E-Document Service"; var TempBlob: Codeunit "Temp Blob"; EDocCount: Integer; HttpRequest: HttpRequestMessage; HttpResponse: HttpResponseMessage; var IsCreated: Boolean; var IsProcessed: Boolean) | 23-29 | Pending 26.0 | This event is removed. Use new IDocumentReceiver interface instead |
| Integration event | OnAfterProcessIncomingEDocument | (EDocument: Record "E-Document"; EDocImportParameters: Record "E-Doc. Import Parameters"; StartState: Enum "Import E-Doc. Proc. Status"; DesiredEndState: Enum "Import E-Doc. Proc. Status") | 26-29 | - | - |

## Source

Symbols: Microsoft.E-DocumentCore.symbols.e1d97edc-c239-46b4-8d84-6368bdf67c8b, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-11-20.
AL source 28: https://github.com/microsoft/BCApps, MIT, releases/28.x at 408a4cc8d3a4c54b60464cc14c964479facb9ba0.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
