---
id: object/codeunit/20038
type: object
title: Codeunit 20038 "APIV1 - Send Sales Document"
summary: Codeunit 20038 "APIV1 - Send Sales Document" in APIV1 (Microsoft.API.V1). 3 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - apiv1
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: 155c459a61946bbeba4290444ef2096914de3604bf4c6c7806933f4cfa74941f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/APIV1/app/src/codeunits/APIV1SendSalesDocument.Codeunit.al
    title: src/Apps/W1/APIV1/app/src/codeunits/APIV1SendSalesDocument.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: 20038
name: APIV1 - Send Sales Document
namespace: Microsoft.API.V1
app: APIV1
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: 18
  events: 0
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 4
  implements: 0
---

# Codeunit 20038 "APIV1 - Send Sales Document"

> Codeunit 20038 "APIV1 - Send Sales Document" in APIV1 (Microsoft.API.V1). 3 public procedures. Introduced in BC29, still in BC30.

APIV1 · Microsoft.API.V1 · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/APIV1/app/src/codeunits/APIV1SendSalesDocument.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Job Queue Entry |

## Procedures

- `SendCreditMemo(var SalesCrMemoHeader: Record "Sales Cr.Memo Header")`
- `SendQuote(var SalesHeader: Record "Sales Header")`
- `CheckDocumentIfNoItemsExists(SalesHeader: Record "Sales Header")`

Plus 15 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 472 "Job Queue Entry"](../table/472.md)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 2135 "O365 Setup Email"](../codeunit/2135.md) (3 calls: `SendCancelledCreditMemo → CheckMailSetup`, `SendDocument → CheckMailSetup`, `SendPostedCreditMemo → CheckMailSetup`)
- [Codeunit 1320 "Lines Instruction Mgt."](../codeunit/1320.md) (1 call: `SendDocument → SalesCheckAllLinesHaveQuantityAssigned`)
- [Codeunit 260 "Document-Mailing"](../codeunit/260.md) (1 call: `SendCreditMemoCancelationEmail → EmailFileWithSubjectAndReportUsage`)
- [Codeunit 453 "Job Queue - Enqueue"](../codeunit/453.md) (1 call: `SendCancelledCreditMemoInBackground → (object)`)

## Called by

- [Page 20038 "APIV1 - Sales Credit Memos"](../page/20038.md) (3 calls: `CancelAndSend → SendCreditMemo`, `PostAndSend → SendCreditMemo`, `Send → SendCreditMemo`)
- [Page 20012 "APIV1 - Sales Invoices"](../page/20012.md) (2 calls: `PostInvoice → CheckDocumentIfNoItemsExists`, `SendDraftInvoice → CheckDocumentIfNoItemsExists`)
- [Page 20028 "APIV1 - Sales Orders"](../page/20028.md) (1 call: `PostWithShipAndInvoice → CheckDocumentIfNoItemsExists`)
- [Page 20037 "APIV1 - Sales Quotes"](../page/20037.md) (1 call: `Send → SendQuote`)

## Across versions

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

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). The call sections above are our own, per object, from the BC29 call graph. 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: "APIV1 - Send Sales Document")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
