---
id: object/codeunit/6109
type: object
title: Codeunit 6109 "E-Document Import Helper"
summary: Codeunit 6109 "E-Document Import Helper" in EDocument (Microsoft.eServices.EDocument). 34 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - edocument
versions:
  introduced: "29"
  last_changed: null
  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: 906f31985071f696446ac84adca80305bd3ffc412fbad28b6c2fbf5ef1fdbaf2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/EDocument/app/src/Helpers/EDocumentImportHelper.Codeunit.al
    title: src/Apps/W1/EDocument/app/src/Helpers/EDocumentImportHelper.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10631
    - change/bcapps/10349
object_type: codeunit
object_id: 6109
name: E-Document Import Helper
namespace: Microsoft.eServices.EDocument
app: EDocument
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 50
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 6109 "E-Document Import Helper"

> Codeunit 6109 "E-Document Import Helper" in EDocument (Microsoft.eServices.EDocument). 34 public procedures. Introduced in BC29, still in BC30.

EDocument · Microsoft.eServices.EDocument · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/EDocument/app/src/Helpers/EDocumentImportHelper.Codeunit.al) · facts from BC29

## Procedures

- `ResolveUnitOfMeasureFromDataImport(var EDocument: Record "E-Document"; var TempDocumentLine: RecordRef): Boolean`
- `FindItemReferenceForLine(var EDocument: Record "E-Document"; var TempDocumentLine: RecordRef): Boolean`: Use it to find an item by reference and update item information for the imported document line.
- `FindItemForLine(var EDocument: Record "E-Document"; var TempDocumentLine: RecordRef): Boolean`: Use it to find an item by GTIN and update item information for the imported document line.
- `FindGLAccountForLine(var EDocument: Record "E-Document"; var TempDocumentLine: RecordRef): Boolean`: Use it to find a G/L account by imported text in Text-to-Account Mapping and update account information for the imported document line.
- `LogErrorIfItemNotFound(var EDocument: Record "E-Document"; var TempDocumentLine: RecordRef): Boolean`: Use it to log an error if an item or a G/L account is not found for the imported document line.
- `ValidateLineDiscount(var EDocument: Record "E-Document"; var TempDocumentLine: RecordRef)`: Use it to validate discount for the imported document line.
- `ValidateReceivingCompanyInfo(EDocument: Record "E-Document"; EDocService: Record "E-Document Service")`: Use it to check if receiving company information is in line with Company Information. Also checks if the Receiving Company Id matches a Company Service Participant.
- `ValidateReceivingCompanyInfo(EDocument: Record "E-Document")`: Use it to check if receiving company information is in line with Company Information.
- `ValidateReceivingCompanyInfoByNameAndAddress(EDocument: Record "E-Document")`: Use it to check if receiving company name and address is in line with Company Information.
- `ApplyInvoiceDiscount(var EDocument: Record "E-Document"; var TempDocumentHeader: RecordRef; var DocumentHeader: RecordRef)`: Use it to apply invoice discount for the imported document.
- `VerifyTotal(var EDocument: Record "E-Document"; var TempDocumentHeader: RecordRef; var DocumentHeader: RecordRef)`: Use it to verify compare imported document totals with created docuemnt totals.
- `FindVendor(VendorNoText: Code[20]; GLN: Code[13]; VATRegistrationNo: Text[20]): Code[20]`: Use it to find a vendor by number, GLN or VAT registration number.
- `FindVendor(VendorNoText: Code[20]; GLN: Code[13]; VATRegistrationNo: Text[20]; RegistrationNo: Text[20]): Code[20]`: Use it to find a vendor by number, GLN, VAT registration number or registration number.
- `FindVendorById(VendorIdText: Text): Code[20]`: Use it to find a vendor by Id.
- `FindVendorByNo(VendorNoText: Code[20]): Code[20]`: Use it to find a vendor by number.
- `FindVendorByGLN(GLN: Code[13]): Code[20]`: Use it to find a vendor by GLN.
- `FindVendorByVATRegistrationNo(VATRegistrationNo: Text[20]): Code[20]`: Use it to find a vendor by VAT registration number.
- `FindVendorByRegistrationNo(RegistrationNo: Text[20]): Code[20]`: Use it to find a vendor by registration number.
- `FindVendorByPhoneNo(PhoneNo: Text): Code[20]`: Use it to find a vendor by phone number.
- `FindVendorByNameAndAddress(VendorName: Text; VendorAddress: Text): Code[20]`: Use it to find a vendor by name and address.
- `FindVendorByNameAndAddressWithNotification(VendorName: Text; VendorAddress: Text; EDocEntryNoForNotification: Integer): Code[20]`: Use it to find a vendor by name and address and raise a notification if vendor is found by name but not by address.
- `FindCustomerByNameAndAddress(CustomerName: Text; CustomerAddress: Text): Code[20]`: Use it to find a customer by name and address using fuzzy matching.
- `FindVendorByBankAccount(VendorIBAN: Code[50]; VendorBankBranchNo: Text[20]; VendorBankAccountNo: Text[30]): Code[20]`: Use it to find a vendor by IBAN, vendor bank branch number and vendor bank account number.
- `GetVendor(var EDocument: Record "E-Document"; VendorNo: Code[20]): Record Vendor`: Use it to get a vendor by number, or rise an error if vendor does not exist
- `FindVendorByServiceParticipant(VendorID: Text[200]; EDocumentServiceCode: Code[20]): Code[20]`: Use it to find a vendor by service participant
- `LogErrorIfVendorIsSelfBilling(var EDocument: Record "E-Document"; Vendor: Record Vendor)`
- `ProcessDocument(var EDocument: Record "E-Document"; CreateJnlLine: Boolean)` (obsolete 26.0: Use codeunit 6140 "E-Doc. Import"'s method ProcessIncomingEDocument): Use it to process imported E-Document
- `SetHideDialogs(Hide: Boolean)`: Use it to set hide dialogs when importing E-Document.
- `DetermineFileType(MimeType: Text): Text`: Use it to find attachment file extension when importing E-Document.
- `ProcessField(EDocument: Record "E-Document"; RecRef: RecordRef; Field: Record Field; DocumentFieldRef: FieldRef)` (internal)
- `ProcessFieldNoValidate(RecRef: RecordRef; FieldNo: Integer; Value: Text[250])` (internal)
- `ProcessField(EDocument: Record "E-Document"; RecRef: RecordRef; FieldNo: Integer; Value: Text[250])` (internal)
- `ProcessDecimalField(EDocument: Record "E-Document"; RecRef: RecordRef; FieldNo: Integer; Value: Decimal)` (internal)
- `GetCurrencyRoundingPrecision(CurrencyCode: Code[10]): Decimal` (internal)

Plus 16 local procedures.

## Recent changes

- 2026-08-26 [#10631 Integration/main to releases 29.x 31a860b5](../../changes/bcapps/10631.md) (releases/29.x, BC29, feature)
- 2026-08-24 [#10349 [DE] Support registration numbers in E-Documents](../../changes/bcapps/10349.md) (main, BC30, feature)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

## Deprecations

- procedure ProcessDocument: Pending 26.0 (#if not CLEAN26), "Use codeunit 6140 "E-Doc. Import"'s method ProcessIncomingEDocument"

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). 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: "codeunit", object_name: "E-Document Import Helper")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
