---
id: object/codeunit/82
type: object
title: Codeunit 82 "Sales-Post + Print"
summary: Codeunit 82 "Sales-Post + Print" in Base Application (Microsoft.Sales.Posting). 6 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC25-26.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "26"
  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: 037429ccda020f9dabfd2ee4fc4c33ba9fc9890761b5855d593ccb4b53705941
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Posting/SalesPostPrint.Codeunit.al
    title: src/Layers/W1/BaseApp/Sales/Posting/SalesPostPrint.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations:
    - localization/au
    - localization/nz
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 82
name: Sales-Post + Print
namespace: Microsoft.Sales.Posting
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "26"
source_major: "29"
obsolete: null
countries:
  - au
  - nz
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 22
  events: 13
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 1
  implements: 0
---

# Codeunit 82 "Sales-Post + Print"

> Codeunit 82 "Sales-Post + Print" in Base Application (Microsoft.Sales.Posting). 6 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC25-26.

Base Application · Microsoft.Sales.Posting · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Sales/Posting/SalesPostPrint.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| TableNo | Sales Header |

## Events published

- `OnAfterPost(var SalesHeader: Record "Sales Header")` (integration): Raised after the sales document has been posted.
- `OnAfterConfirmPost(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration): Raised after the user confirms posting the sales document.
- `OnBeforeConfirmPost(var SalesHeader: Record "Sales Header"; var HideDialog: Boolean; var IsHandled: Boolean; var SendReportAsEmail: Boolean; var DefaultOption: Integer)` (integration): Raised before confirming the post and print operation.
- `OnBeforeConfirmPostProcedure(var SalesHeader: Record "Sales Header"; var DefaultOption: Integer; var Result: Boolean; var IsHandled: Boolean)` (integration): Raised before the confirmation dialog procedure.
- `OnBeforeGetReport(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; SendReportAsEmail: Boolean)` (integration): Raised before getting the report to print or email.
- `OnBeforeOnRun(var SalesHeader: Record "Sales Header")` (integration): Raised before the OnRun trigger executes.
- `OnBeforePrintInvoice(var SalesHeader: Record "Sales Header"; SendReportAsEmail: Boolean; var IsHandled: Boolean)` (integration): Raised before printing or emailing the posted sales invoice.
- `OnBeforePrintCrMemo(var SalesHeader: Record "Sales Header"; SendReportAsEmail: Boolean; var IsHandled: Boolean)` (integration): Raised before printing or emailing the posted sales credit memo.
- `OnBeforePrintReceive(var SalesHeader: Record "Sales Header"; SendReportAsEmail: Boolean; var IsHandled: Boolean)` (integration): Raised before printing or emailing the posted return receipt.
- `OnBeforePrintShip(var SalesHeader: Record "Sales Header"; SendReportAsEmail: Boolean; var IsHandled: Boolean)` (integration): Raised before printing or emailing the posted sales shipment.
- `OnBeforeRunSalesPost(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)` (integration): Raised before running the Sales-Post codeunit.
- `OnPrintInvoiceOnAfterSetSalesInvHeaderFilter(var SalesHeader: Record "Sales Header"; var SalesInvoiceHeader: Record "Sales Invoice Header"; SendReportAsEmail: Boolean)` (integration): Raised after setting the filter on the sales invoice header for printing.
- `OnAfterGetReport(var SalesHeader: Record "Sales Header"; SendReportAsEmail: Boolean)` (integration): Raised after getting and printing or emailing the report.

## Procedures

- `PostAndEmail(var ParmSalesHeader: Record "Sales Header")`: Posts the sales document and sends the posted document to the customer via email.
- `GetReport(var SalesHeader: Record "Sales Header")`: Prints or emails the posted sales document based on the document type and settings.
- `PrintReceive(var SalesHeader: Record "Sales Header")`: Prints or emails the posted return receipt document.
- `PrintInvoice(var SalesHeader: Record "Sales Header")`: Prints or emails the posted sales invoice document.
- `PrintShip(var SalesHeader: Record "Sales Header")`: Prints or emails the posted sales shipment document.
- `PrintCrMemo(var SalesHeader: Record "Sales Header")`: Prints or emails the posted sales credit memo document.

Plus 3 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 36 "Sales Header"](../table/36.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 80 "Sales-Post"](../codeunit/80.md) (1 call: `RunSalesPost → (object)`)
- [Codeunit 88 "Sales Post via Job Queue"](../codeunit/88.md) (1 call: `Code → EnqueueSalesDoc`)
- [Codeunit 99 "Posting Selection Management"](../codeunit/99.md) (1 call: `ConfirmPost → ConfirmPostSalesDocument`)

## Called by

- [Codeunit 7324 "Whse.-Activity-Post"](../codeunit/7324.md) (1 call: `Code → GetReport`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25-26

## Countries that replace it

[AU](../../localizations/au.md), [NZ](../../localizations/nz.md)

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: "Sales-Post + Print")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
