---
id: object/codeunit/6102
type: object
title: Codeunit 6102 "E-Doc. Export"
summary: Codeunit 6102 "E-Doc. Export" in EDocument (Microsoft.eServices.EDocument). 10 public procedures, 5 events. Introduced in BC29, still in BC30, changed in BC30.
tier: official
language: en
tags:
  - codeunit
  - edocument
versions:
  introduced: "29"
  last_changed: "30"
  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: 3ee466af7c6f9333f03c6af74f41af8a5c64edca3d668d38ed6e5e270a155981
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/EDocument/app/src/Processing/EDocExport.Codeunit.al
    title: src/Apps/W1/EDocument/app/src/Processing/EDocExport.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/11560
    - change/bcapps/11484
    - change/bcapps/9578
    - change/bcapps/8183
object_type: codeunit
object_id: 6102
name: E-Doc. Export
namespace: Microsoft.eServices.EDocument
app: EDocument
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in:
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 24
  events: 5
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 0
  called_by: 0
  implements: 0
---

# Codeunit 6102 "E-Doc. Export"

> Codeunit 6102 "E-Doc. Export" in EDocument (Microsoft.eServices.EDocument). 10 public procedures, 5 events. Introduced in BC29, still in BC30, changed in BC30.

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

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "E-Document" = im, tabledata "E-Doc. Mapping" = im, tabledata "E-Doc. Mapping Log" = im |

## Events published

- `OnBeforeEDocumentCheck(RecRef: RecordRef; EDocumentProcessingPhase: Enum "E-Document Processing Phase"; var IsHandled: Boolean)` (integration)
- `OnAfterEDocumentCheck(RecRef: RecordRef; EDocumentProcessingPhase: Enum "E-Document Processing Phase")` (integration)
- `OnBeforeCreateEDocument(var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef)` (integration)
- `OnAfterCreateEDocument(var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef)` (integration)
- `OnExportEDocumentAfterCreateEDocument(EDocumentService: Record "E-Document Service"; EDocument: Record "E-Document"; SourceDocumentHeaderMapped: RecordRef; SourceDocumentLineMapped: RecordRef; var TempBlob: Codeunit "Temp Blob"; Success: Boolean)` (integration)
  - subscribers: [Codeunit 5579 "Digital Voucher Impl."](../codeunit/5579.md) EDocExportOnExportEDocumentAfterCreateEDocument

## Procedures

- `CheckEDocument(var EDocSourceRecRef: RecordRef; EDocumentProcessingPhase: Enum "E-Document Processing Phase")` (internal)
- `CreateEDocument(DocumentHeader: RecordRef; DocumentSendingProfile: Record "Document Sending Profile"; EDocumentType: Enum "E-Document Type"): Boolean` (internal): Creates a new E-Document for the provided document header and attempts to export it.
- `CreateEDocument(DocumentHeader: RecordRef; DocumentSendingProfile: Record "Document Sending Profile"; EDocumentType: Enum "E-Document Type"; AllowReExport: Boolean): Boolean` (internal): Creates a new E-Document of specified type for the provided document header and attempts to export it.
- `CreateAndExportEDocument(var DocumentHeader: RecordRef; var EDocumentService: Record "E-Document Service"; WorkflowCode: Code[20]; DocumentSendingProfileCode: Code[20]; EDocumentType: Enum "E-Document Type"; AllowReExport: Boolean): Boolean`: Orchestrates creating and exporting an E-Document for the given document header and a given set of services. On first call, creates the E-Document record and exports it for every supported service. If an E-Document already exists for the document header, re-exports for every supported service when A...
- `CreateEDocument(var EDocument: Record "E-Document"; var DocumentHeader: RecordRef; var EDocumentService: Record "E-Document Service"; EDocumentType: Enum "E-Document Type"): Boolean`: CreateEDocument - Creates an E-Document record for the given document header and a set of services. If services do not support the document type they are filtered out. If an E-Document already exists for the document header, no record is created
- `ExportEDocument(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service"): Boolean` (internal)
- `ExportEDocumentBatch(var EDocuments: Record "E-Document"; var EDocService: Record "E-Document Service"; var TempEDocMappingLogs: Record "E-Doc. Mapping Log" temporary; var TempBlob: Codeunit "Temp Blob"; var EDocumentsErrorCount: Dictionary of [Integer, Integer])` (internal)
- `Recreate(EDocument: Record "E-Document"; EDocService: Record "E-Document Service")` (internal)
- `MapEDocument(var EDocumentSource: RecordRef; var EDocumentSourceLine: RecordRef; EDocumentFormat: Record "E-Document Service"; var EDocumentSourceMapped: RecordRef; var EDocumentSourceLineMapped: RecordRef; var TempEDocMapping: Record "E-Doc. Mapping" temporary; ForImport: Boolean)` (internal)
- `IsDocumentTypeSupported(EDocService: Record "E-Document Service"; EDocumentType: Enum "E-Document Type"): Boolean`

Plus 9 local procedures.

## Recent changes

- 2026-10-07 [#11560 [E-Documents Core] [Peppol] - Enabling EDI capabilities with E-Documents. Send path (Self-Billed Purchase Invoice/Credit Memo → E-Document)](../../changes/bcapps/11560.md) (main, BC30, feature)
- 2026-09-29 [#11484 [E-Documents Core] - Supported type direction configuration](../../changes/bcapps/11484.md) (main, BC30, feature)
- 2026-08-11 [#9578 [E-Documents Core] - Enabling remittance advice export via E-Documents (payment journal + posted payments)](../../changes/bcapps/9578.md) (main, BC30, feature)
- 2026-07-14 [#8183 Handle failure to manually create E-Document from posted doc with no …](../../changes/bcapps/8183.md) (main, BC30, fix)

## Across versions

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

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-Doc. Export")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
