---
id: object/codeunit/6405
type: object
title: Codeunit 6405 "E-Doc. Create Sales Order"
summary: Codeunit 6405 "E-Doc. Create Sales Order" in EDocument (Microsoft.eServices.EDocument.Processing.Import.Sales). 3 public procedures. Introduced in BC24, still in BC30, changed in BC29.
tier: official
language: en
tags:
  - codeunit
  - edocument
versions:
  introduced: "24"
  last_changed: "29"
  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: 75c87e2ab1dfe7da51a0e6cc49b0caee9a1b8267ada940c915196d42a34c7d54
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/EDocument/app/src/Processing/Import/Sales/EDocCreateSalesOrder.Codeunit.al
    title: src/Apps/W1/EDocument/app/src/Processing/Import/Sales/EDocCreateSalesOrder.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 6405
name: E-Doc. Create Sales Order
namespace: Microsoft.eServices.EDocument.Processing.Import.Sales
app: EDocument
extends: null
first_version: "24"
last_version: "30"
present_in:
  - "24"
  - "25"
  - "26"
  - "27"
  - "29"
  - "30"
changed_in:
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 4
  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 6405 "E-Doc. Create Sales Order"

> Codeunit 6405 "E-Doc. Create Sales Order" in EDocument (Microsoft.eServices.EDocument.Processing.Import.Sales). 3 public procedures. Introduced in BC24, still in BC30, changed in BC29.

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

## Properties

| Property | Value |
|---|---|
| Access | Internal |

## Procedures

- `ApplyDraftToBC(EDocument: Record "E-Document"; EDocImportParameters: Record "E-Doc. Import Parameters"): RecordId`: Creates a BC sales document from the e-document draft by delegating to the customizations interface.
- `RevertDraftActions(EDocument: Record "E-Document")`: Reverts the BC sales document creation and moves attachments back to the e-document.
- `CreateSalesOrder(EDocument: Record "E-Document"): Record "Sales Header"`: Default implementation: creates a Sales Order and Sales Order Lines from the staged draft data.

Plus 1 local procedures.

## Across versions

- Present in: BC24-27, BC29-30
- Changed (declaration) in: BC29

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