Codeunit 1323 "Cancel PstdSalesInv (Yes/No)"
Base Application · Microsoft.Sales.History
Across versions
- BC23-28present
- BC291 procedures added, 1 events added
- BC301 procedures added
Neighbourhood 3 connected objects and pages
Base Application · Microsoft.Sales.History · BC23-30 · source at 4e6a307c · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Sales Invoice Header |
| Permissions | TableData “Sales Invoice Header” = rm, TableData “Sales Cr.Memo Header” = rm |
Events published
OnCancelInvoiceOnBeforeConfirm(var SalesInvoiceHeader: Record "Sales Invoice Header"; var ConfirmQuestion: Text)+ BC29 (integration)OnCancelInvoiceOnBeforePostedSalesCreditMemo(var SalesCrMemoHeader: Record "Sales Cr.Memo Header"; var IsHandled: Boolean)(integration)OnCancelInvoiceOnBeforeTestCorrectInvoiceIsAllowed(var SalesInvoiceHeader: Record "Sales Invoice Header"; var IsHandled: Boolean)(integration)
Procedures
CancelInvoice(var SalesInvoiceHeader: Record "Sales Invoice Header"): Boolean: Cancels the posted sales invoice after user confirmation and optionally opens the created credit memo.
Plus 1 local procedures.
Triggers
OnRun
Relations
- runs on Table 112 “Sales Invoice Header”
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 1303 “Correct Posted Sales Invoice” (2 calls:
CancelInvoice → CancelPostedInvoice,CancelInvoice → TestCorrectInvoiceIsAllowed) - Codeunit 700 “Page Management” (1 call:
CancelInvoice → PageRun)
Recent changes
- 2026-11-06 #11256 [main] Add setup option to restore Sales and Purchase Order quantities when posting returns (main, BC30, feature)
- 2026-07-24 #9439 [Extensibility Request] issue 30330: add OnCancelInvoiceOnBeforeConfirm event (main, BC30, feature)
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- Correct or cancel a posted sales invoice — possibly related: Documents canceling posted sales invoices by creating reversing credit memos. (model-linked)
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: "Cancel PstdSalesInv (Yes/No)"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.