Codeunit 81 "Sales-Post (Yes/No)"
Base Application · Microsoft.Sales.Posting
Across versions
- BC23present
- BC241 procedures added
- BC251 events added
- BC261 events added, 1 events removed
- BC27-30unchanged
Neighbourhood 13 connected objects and pages
Base Application · Microsoft.Sales.Posting · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| TableNo | Sales Header |
Events published
OnAfterPost(var SalesHeader: Record "Sales Header"; PostAndSend: Boolean)(integration): Raised after the sales document has been posted.OnAfterConfirmPost(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)+ BC26 − BC26 (integration): Raised after the user confirms posting the sales document.OnRunPreviewOnAfterSetPostingFlags(var SalesHeader: Record "Sales Header")(integration): Raised after the posting flags (Ship, Receive, Invoice) are set during posting preview.OnBeforeConfirmPost(var SalesHeader: Record "Sales Header"; var DefaultOption: Integer; var Result: Boolean; var IsHandled: Boolean)(integration): Raised before displaying the posting confirmation dialog.OnBeforeConfirmSalesPost(var SalesHeader: Record "Sales Header"; var HideDialog: Boolean; var IsHandled: Boolean; var DefaultOption: Integer; var PostAndSend: Boolean)(integration): Raised before confirming and posting the sales document.OnBeforeOnRun(var SalesHeader: Record "Sales Header")(integration): Raised before the OnRun trigger executes.OnBeforeRunSalesPost(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean; var SuppressCommit: Boolean)(integration): Raised before running the Sales-Post codeunit.OnConfirmPostOnBeforeSetSelection(var SalesHeader: Record "Sales Header")(integration): Raised before setting the posting selection options in the confirmation dialog.OnBeforeRunPreview(var Result: Boolean; RecVar: Variant; var IsHandled: Boolean)+ BC25 (integration): Raised before running the posting preview.
Event subscriptions
- OnRunPreview subscribes to Codeunit “Gen. Jnl.-Post Preview” OnRunPreview
Procedures
PostAndSend(var SalesHeader: Record "Sales Header"): Posts the sales document and sends it to the customer using the configured document sending profile.Preview(var SalesHeader: Record "Sales Header"): Previews the posting of the sales document without actually posting it, showing the expected ledger entries.MessageIfPostingPreviewMultipleDocuments(var SalesHeaderToPreview: Record "Sales Header"; DocumentNo: Code[20])+ BC24: Displays a message if previewing multiple sales documents and indicates which document is being previewed.
Plus 3 local procedures.
Triggers
OnRun
Relations
- runs on Table 36 “Sales 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 80 “Sales-Post” (4 calls:
OnRunPreview → (object),OnRunPreview → SetPreviewMode,RunSalesPost → (object), …) - Codeunit 19 “Gen. Jnl.-Post Preview” (2 calls:
MessageIfPostingPreviewMultipleDocuments → MessageIfPostingPreviewMultipleDocuments,Preview → Preview) - Codeunit 88 “Sales Post via Job Queue” (1 call:
Code → EnqueueSalesDoc) - Codeunit 9070 “Document Errors Mgt.” (1 call:
OnRun → GetNothingToPostErrorMsg) - Codeunit 99 “Posting Selection Management” (1 call:
ConfirmPost → ConfirmPostSalesDocument)
Called by
- Page 9301 “Sales Invoice List” (2 calls:
ShowPreview → MessageIfPostingPreviewMultipleDocuments,ShowPreview → Preview) - Page 9305 “Sales Order List” (2 calls:
ShowPreview → MessageIfPostingPreviewMultipleDocuments,ShowPreview → Preview) - Codeunit 79 “Sales-Post and Send” (1 call:
Code → PostAndSend) - Page 42 “Sales Order” (1 call:
ShowPreview → Preview) - Page 43 “Sales Invoice” (1 call:
ShowPreview → Preview) - Page 44 “Sales Credit Memo” (1 call:
ShowPreview → Preview) - Page 6630 “Sales Return Order” (1 call:
ShowPreview → Preview)
Countries that replace it
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 (Yes/No)"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.