codeunitSales & Receivablesofficial - Microsoftderived - from the source, no model text

Codeunit 1371 "Sales Batch Post Mgt."

Base Application · Microsoft.Sales.Posting

Across versions

  1. BC23-24present
  2. BC253 procedures added
  3. BC26-30unchanged

Neighbourhood 12 connected objects and pages

Table 36 "Sales Header" (relates to)Sales HeaderCodeunit 1380 "Batch Processing Mgt." (calls, 9 links)Batch Processing Mgt.Codeunit 28 "Error Message Management" (calls, 4 links)Error Message ManagementCodeunit 414 "Release Sales Document" (calls, 2 links)Release Sales DocumentCodeunit 1535 "Approvals Mgmt." (calls)Approvals Mgmt.Codeunit 29 "Error Message Handler" (calls)Error Message HandlerCodeunit 410 "Update Analysis View" (calls)Update Analysis ViewCodeunit 431 "IC Outbox Export" (calls)Codeunit 60 "Sales-Calc. Discount" (calls)Sales-Calc. DiscountCodeunit 7150 "Update Item Analysis View" (calls)Update Item Analysis ViewCodeunit 85 "Sales Post Batch via Job Queue" (calls)Sales Post Batch via Job QueueCodeunit 88 "Sales Post via Job Queue" (calls)Sales Post via Job Queue

Open in the neighbourhood explorer

One hop out, from the extracted relations and call graph. Up to 40 shown; the sections below list them all.

Base Application · Microsoft.Sales.Posting · BC23-30 · source at ea08af5e · facts from BC29

Properties

Property Value
TableNo Sales Header
Permissions TableData “Batch Processing Parameter” = rimd, TableData “Batch Processing Session Map” = rimd

Events published

  • OnAfterCanPostDocument(var SalesHeader: Record "Sales Header"; var BatchProcessingMgt: Codeunit "Batch Processing Mgt."; var Result: Boolean) (integration): Raised after determining whether a sales document can be posted in the batch.
  • OnAfterHandleOnCustomProcessing(var RecRef: RecordRef; var SalesHeader: Record "Sales Header"; var BatchProcessingMgt: Codeunit "Batch Processing Mgt."; var Handled: Boolean; var KeepParameters: Boolean) (integration): Raised after custom processing is handled for a sales document in the batch.
  • OnAfterPrepareSalesHeader(var SalesHeader: Record "Sales Header"; var BatchProcessingMgt: Codeunit "Batch Processing Mgt.") (integration): Raised after preparing the sales header for batch posting.
  • OnBeforeRunBatch(var SalesHeader: Record "Sales Header"; var ReplacePostingDate: Boolean; var PostingDate: Date; var ReplaceDocumentDate: Boolean; var Ship: Boolean; var Invoice: Boolean) (integration): Raised before running the batch posting process.
  • OnPrepareSalesHeaderOnAfterBatchConfirmUpdateDeferralDate(var SalesHeader: Record "Sales Header"; var BatchProcessingMgt: Codeunit "Batch Processing Mgt.") (integration): Raised after updating the deferral date during sales header preparation.
  • OnRunBatchOnAfterAddParameters(var BatchProcessingMgt: Codeunit "Batch Processing Mgt."; var SalesBatchPostMgt: Codeunit "Sales Batch Post Mgt."; PostingCodeunitId: Integer) (integration): Raised after adding batch posting parameters to the batch processor.
  • OnGetICBatchFileName(var Result: Text) (integration): Raised to customize the intercompany batch file name.
  • OnBeforeReleaseSalesHeader(var SalesHeader: Record "Sales Header"; var Result: Boolean; var IsHandled: Boolean) (integration): Raised before releasing the sales header during batch preparation.
  • OnBeforeRunWithUI(var SalesHeader: Record "Sales Header"; TotalCount: Integer; Question: Text; var IsHandled: Boolean) (integration): Raised before running the batch posting with user interface.

Event subscriptions

  • PrepareSalesHeaderOnBeforeBatchProcessing subscribes to Codeunit “Batch Processing Mgt.” OnBeforeBatchProcessing
  • CheckSalesHeaderOnVerifyRecord subscribes to Codeunit “Batch Processing Mgt.” OnVerifyRecord
  • HandleOnCustomProcessing subscribes to Codeunit “Batch Processing Mgt.” OnCustomProcessing
  • OnIsPostWithJobQueueEnabledHandler subscribes to Codeunit “Batch Processing Mgt.” OnIsPostWithJobQueueEnabled
  • OnProcessBatchInBackgroundHandler subscribes to Codeunit “Batch Processing Mgt.” OnProcessBatchInBackground
  • OnBatchProcessOnBeforeResetBatchID subscribes to Codeunit “Batch Processing Mgt.” OnBatchProcessOnBeforeResetBatchID
  • OnBeforeUpdateAnalysisView subscribes to Codeunit “Update Analysis View” OnBeforeUpdateAll
  • OnBeforeUpdateItemAnalysisView subscribes to Codeunit “Update Item Analysis View” OnBeforeUpdateAll

Procedures

  • RunBatch(var SalesHeader: Record "Sales Header"; ReplacePostingDate: Boolean; PostingDate: Date; ReplaceDocumentDate: Boolean; CalcInvoiceDiscount: Boolean; Ship: Boolean; Invoice: Boolean): Runs batch posting of sales documents with the specified posting parameters.
  • RunWithUI(var SalesHeader: Record "Sales Header"; TotalCount: Integer; Question: Text): Runs batch posting with a confirmation dialog and error handling UI.
  • GetBatchProcessor(var ResultBatchProcessingMgt: Codeunit "Batch Processing Mgt."): Gets the batch processing management codeunit instance used for batch posting.
  • SetBatchProcessor(NewBatchProcessingMgt: Codeunit "Batch Processing Mgt."): Sets the batch processing management codeunit instance to be used for batch posting.
  • Code(var SalesHeader: Record "Sales Header"): Executes the batch posting of sales documents using the configured batch processor.
  • SetPostingCodeunitId(NewPostingCodeunitId: Integer): Sets the codeunit ID to be used for posting each sales document in the batch.
  • SetParameter(ParameterId: Enum "Batch Posting Parameter Type"; ParameterValue: Variant): Sets a batch posting parameter value in the batch processor.

Plus 12 local procedures.

Triggers

OnRun

Relations

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.

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 Batch Post Mgt."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.

Evidence 1 sources