Codeunit 443 "Sales-Post Prepayment (Yes/No)"
Base Application · Microsoft.Sales.Posting
Across versions
- BC23-27present
- BC281 events added
- BC29-30unchanged
Neighbourhood 6 connected objects and pages
Base Application · Microsoft.Sales.Posting · BC23-30 · source at 4e6a307c · facts from BC29
Events published
OnAfterPostPrepmtInvoiceYN(var SalesHeader: Record "Sales Header")(integration): Raised after posting the prepayment invoice for a sales order.OnAfterPostPrepmtCrMemoYN(var SalesHeader: Record "Sales Header")(integration): Raised after posting the prepayment credit memo for a sales order.OnBeforeGetReport(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"; var IsHandled: Boolean)(integration): Raised before getting the report to print the prepayment document.OnBeforeConfirmForDocument(var SalesHeader: Record "Sales Header"; var Result: Boolean; var IsHandled: Boolean)(integration): Raised before displaying the confirmation dialog for posting the prepayment document.OnBeforePostPrepmtDocument(var SalesHeader: Record "Sales Header"; PrepmtDocumentType: Option)(integration): Raised before posting the prepayment document.OnPostPrepmtInvoiceYNOnBeforeConfirm(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)(integration): Raised before confirming the posting of the prepayment invoice.OnPostPrepmtCrMemoYNOnBeforeConfirm(var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)+ BC28 (integration): Raised before confirming the posting of the prepayment credit memo.OnPostPrepmtDocumentOnBeforeRunSalesPostPrepayments(var SalesHeader: Record "Sales Header"; var SuppressCommit: Boolean)(integration): Raised before running the Sales-Post Prepayments codeunit.
Event subscriptions
- OnRunPreview subscribes to Codeunit “Gen. Jnl.-Post Preview” OnRunPreview
Procedures
PostPrepmtInvoiceYN(var SalesHeader2: Record "Sales Header"; Print: Boolean): Posts a prepayment invoice for the sales order after prompting the user for confirmation.PostPrepmtCrMemoYN(var SalesHeader2: Record "Sales Header"; Print: Boolean): Posts a prepayment credit memo for the sales order after prompting the user for confirmation.Preview(var SalesHeader: Record "Sales Header"; DocumentType: Option): Previews the posting of a prepayment document without actually posting it.GetReport(var SalesHeader: Record "Sales Header"; DocumentType: Option Invoice,"Credit Memo"): Prints the posted prepayment invoice or credit memo.SetDocumentType(NewPrepmtDocumentType: Option): Sets the prepayment document type to be used for posting.
Plus 2 local procedures.
Triggers
OnRun
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 442 “Sales-Post Prepayments” (6 calls:
OnRunPreview → (object),OnRunPreview → SetDocumentType,OnRunPreview → SetPreviewMode, …) - Codeunit 28 “Error Message Management” (2 calls:
PostPrepmtDocument → Activate,PostPrepmtDocument → PushContext) - Codeunit 19 “Gen. Jnl.-Post Preview” (1 call:
Preview → Preview) - Codeunit 27 “Confirm Management” (1 call:
ConfirmForDocument → GetResponseOrDefault) - Codeunit 29 “Error Message Handler” (1 call:
PostPrepmtDocument → ShowErrors)
Called by
- Page 42 “Sales Order” (2 calls:
ShowPrepmtCrMemoPreview → Preview,ShowPrepmtInvoicePreview → Preview)
Recent changes
- 2026-08-13 #10128 [Extensibility Request] issue 30357: add prepayment credit memo confirmation 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 prepayments — possibly related: Codeunit handles posting prepayment credit memos and invoices, core prepayment correction functionality (model-linked)
- Invoice prepayments — possibly related: Documents prepayment invoicing and credit memo processes this codeunit implements (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: "Sales-Post Prepayment (Yes/No)"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.