---
id: object/page/20012
type: object
title: Page 20012 "APIV1 - Sales Invoices"
summary: Page 20012 "APIV1 - Sales Invoices" in APIV1 (Microsoft.API.V1). 6 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - page
  - 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: c6f87c95420da5804508fac5c1cc930d9bb6bfba49a134a1ca2b6b4c178be0f3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/APIV1/app/src/pages/APIV1SalesInvoices.Page.al
    title: src/Apps/W1/APIV1/app/src/pages/APIV1SalesInvoices.Page.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_delete
    title: (v1.0) Delete salesInvoices
    date: null
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_get
    title: (v1.0) Get salesInvoices
    date: null
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_pdfdocument
    title: (v1.0) Get salesInvoice pdfDocument
    date: null
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_update
    title: (v1.0) Update salesInvoices
    date: null
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/resources/dynamics_salesinvoice
    title: (v1.0) salesInvoices resource type
    date: null
    commit: null
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_delete
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_get
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_pdfdocument
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_update
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/resources/dynamics_salesinvoice
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: page
object_id: 20012
name: APIV1 - Sales Invoices
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:
  - docs/learn-devitpro/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_delete.md
  - docs/learn-devitpro/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_get.md
  - docs/learn-devitpro/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_pdfdocument.md
  - docs/learn-devitpro/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_update.md
  - docs/learn-devitpro/dev-itpro/api-reference/v1.0/resources/dynamics_salesinvoice.md
counts:
  fields: 0
  procedures: 33
  events: 0
  subscribers: 0
  controls: 39
  actions: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 9
  called_by: 0
  implements: 0
---

# Page 20012 "APIV1 - Sales Invoices"

> Page 20012 "APIV1 - Sales Invoices" in APIV1 (Microsoft.API.V1). 6 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/pages/APIV1SalesInvoices.Page.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | 'salesInvoices', Locked = true |
| Extensible | false |
| SourceTable | Sales Invoice Entity Aggregate |
| PageType | API |

## Fields on this page

Layout controls in source order, grouped by the container they sit in. Shows: the table field a control is bound to (or its expression as written); ToolTip: the control's own, else the bound field's (marked).

| Group | Control | Shows | ToolTip |
|---|---|---|---|
| Group | id | [Id](../table/5475.md#fields) | — |
|  | number | [No.](../table/5475.md#fields) | — |
|  | externalDocumentNumber | [External Document No.](../table/5475.md#fields) | — |
|  | invoiceDate | [Document Date](../table/5475.md#fields) | — |
|  | postingDate | [Posting Date](../table/5475.md#fields) | — |
|  | dueDate | [Due Date](../table/5475.md#fields) | — |
|  | customerPurchaseOrderReference | [Your Reference](../table/5475.md#fields) | — |
|  | customerId | [Customer Id](../table/5475.md#fields) | — |
|  | contactId | [Contact Graph Id](../table/5475.md#fields) | — |
|  | customerNumber | [Sell-to Customer No.](../table/5475.md#fields) | — |
|  | customerName | [Sell-to Customer Name](../table/5475.md#fields) | — |
|  | billToName | [Bill-to Name](../table/5475.md#fields) | — |
|  | billToCustomerId | [Bill-to Customer Id](../table/5475.md#fields) | — |
|  | billToCustomerNumber | [Bill-to Customer No.](../table/5475.md#fields) | — |
|  | shipToName | [Ship-to Name](../table/5475.md#fields) | — |
|  | shipToContact | [Ship-to Contact](../table/5475.md#fields) | — |
|  | sellingPostalAddress | `SellingPostalAddressJSONText` | Specifies the selling address of the Sales Invoice. |
|  | billingPostalAddress | `BillingPostalAddressJSONText` | Specifies the billing address of the Sales Invoice. |
|  | shippingPostalAddress | `ShippingPostalAddressJSONText` | Specifies the shipping address of the Sales Invoice. |
|  | currencyId | [Currency Id](../table/5475.md#fields) | — |
|  | currencyCode | `CurrencyCodeTxt` | — |
|  | orderId | [Order Id](../table/5475.md#fields) | — |
|  | orderNumber | [Order No.](../table/5475.md#fields) | — |
|  | paymentTermsId | [Payment Terms Id](../table/5475.md#fields) | — |
|  | shipmentMethodId | [Shipment Method Id](../table/5475.md#fields) | — |
|  | salesperson | [Salesperson Code](../table/5475.md#fields) | — |
|  | pricesIncludeTax | [Prices Including VAT](../table/5475.md#fields) | — |
|  | remainingAmount | `RemainingAmountVar` | — |
|  | salesInvoiceLines | part [Page 20043 "APIV1 - Sales Invoice Lines"](../page/20043.md) | — |
|  | pdfDocument | part [Page 20057 "APIV1 - PDF Document"](../page/20057.md) | — |
|  | discountAmount | [Invoice Discount Amount](../table/5475.md#fields) | — |
|  | discountAppliedBeforeTax | [Discount Applied Before Tax](../table/5475.md#fields) | — |
|  | totalAmountExcludingTax | [Amount](../table/5475.md#fields) | — |
|  | totalTaxAmount | [Total Tax Amount](../table/5475.md#fields) | Specifies the total tax amount for the sales invoice. |
|  | totalAmountIncludingTax | [Amount Including VAT](../table/5475.md#fields) | — |
|  | status | [Status](../table/5475.md#fields) | Specifies the status of the Sales Invoice (cancelled, paid, on hold, created). |
|  | lastModifiedDateTime | [Last Modified Date Time](../table/5475.md#fields) | — |
|  | phoneNumber | [Sell-to Phone No.](../table/5475.md#fields) | — |
|  | email | [Sell-to E-Mail](../table/5475.md#fields) | — |

## Procedures

- `Post(var ActionContext: WebServiceActionContext)`
- `PostAndSend(var ActionContext: WebServiceActionContext)`
- `Send(var ActionContext: WebServiceActionContext)`
- `Cancel(var ActionContext: WebServiceActionContext)`
- `CancelAndSend(var ActionContext: WebServiceActionContext)`
- `MakeCorrectiveCreditMemo(var ActionContext: WebServiceActionContext)`

Plus 27 local procedures.

## Triggers

OnAfterGetRecord, OnDeleteRecord, OnInsertRecord, OnModifyRecord, OnNewRecord, OnOpenPage

## Relations

- source table [Table 5475 "Sales Invoice Entity Aggregate"](../table/5475.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 5477 "Sales Invoice Aggregator"](../codeunit/5477.md) (12 calls: `Cancel → GetSalesInvoiceHeaderId`, `CancelAndSend → GetSalesInvoiceHeaderId`, `GetPostedInvoice → GetSalesInvoiceHeaderFromId`, …)
- [Codeunit 5475 "Graph Mgt - Sales Invoice"](../codeunit/5475.md) (7 calls: `ProcessSellingPostalAddressOnInsert → ParseSellToCustomerAddressFromJSON`, `ProcessSellingPostalAddressOnModify → ParseSellToCustomerAddressFromJSON`, `ProcessShippingPostalAddressOnInsert → ParseShipToCustomerAddressFromJSON`, …)
- [Codeunit 1303 "Correct Posted Sales Invoice"](../codeunit/1303.md) (3 calls: `CancelInvoice → (object)`, `CheckInvoiceCanBeCanceled → TestCorrectInvoiceIsAllowed`, `MakeCorrectiveCreditMemo → CreateCreditMemoCopyDocument`)
- [Codeunit 2135 "O365 Setup Email"](../codeunit/2135.md) (3 calls: `SendCanceledInvoice → CheckMailSetup`, `SendDraftInvoice → CheckMailSetup`, `SendPostedInvoice → CheckMailSetup`)
- [Codeunit 1320 "Lines Instruction Mgt."](../codeunit/1320.md) (2 calls: `PostInvoice → SalesCheckAllLinesHaveQuantityAssigned`, `SendDraftInvoice → SalesCheckAllLinesHaveQuantityAssigned`)
- [Codeunit 20038 "APIV1 - Send Sales Document"](../codeunit/20038.md) (2 calls: `PostInvoice → CheckDocumentIfNoItemsExists`, `SendDraftInvoice → CheckDocumentIfNoItemsExists`)
- [Codeunit 453 "Job Queue - Enqueue"](../codeunit/453.md) (1 call: `SendCanceledInvoice → (object)`)
- [Codeunit 5465 "Graph Mgt - General Tools"](../codeunit/5465.md) (1 call: `SetCalculatedFields → TranslateNAVCurrencyCodeToCurrencyCode`)
- [Codeunit 56 "Sales - Calc Discount By Type"](../codeunit/56.md) (1 call: `UpdateDiscount → ApplyInvDiscBasedOnAmt`)

## Across versions

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

## Documented on Microsoft Learn

- [(v1.0) Delete salesInvoices](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_delete)
- [(v1.0) Get salesInvoices](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_get)
- [(v1.0) Get salesInvoice pdfDocument](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_pdfdocument)
- [(v1.0) Update salesInvoices](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/api/dynamics_salesinvoice_update)
- [(v1.0) salesInvoices resource type](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/api-reference/v1.0/resources/dynamics_salesinvoice)

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: "page", object_name: "APIV1 - Sales Invoices")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
