Codeunit 1371 "Sales Batch Post Mgt."
Base Application · Microsoft.Sales.Posting
Across versions
- BC23-24present
- BC253 procedures added
- BC26-30unchanged
Neighbourhood 12 connected objects and pages
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
- 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 1380 “Batch Processing Mgt.” (9 calls:
Code → BatchProcess,Code → SetProcessingCodeunit,PrepareSalesHeader → GetBooleanParameter, …) - Codeunit 28 “Error Message Management” (4 calls:
PrepareBatch → LogError,RunWithUI → Activate,RunWithUI → GetLastErrorID, …) - Codeunit 414 “Release Sales Document” (2 calls:
PerformManualReleaseOrReopenSalesHeader → PerformManualReopen,ReleaseSalesHeader → (object)) - Codeunit 1535 “Approvals Mgmt.” (1 call:
CheckApprovalWorkflow → IsSalesApprovalsWorkflowEnabled) - Codeunit 29 “Error Message Handler” (1 call:
RunWithUI → ShowErrors) - Codeunit 410 “Update Analysis View” (1 call:
OnRun → UpdateAll) - Codeunit 431 “IC Outbox Export” (1 call:
OnBatchProcessOnBeforeResetBatchID → DownloadBatchFiles) - Codeunit 60 “Sales-Calc. Discount” (1 call:
CalculateInvoiceDiscount → (object)) - Codeunit 7150 “Update Item Analysis View” (1 call:
OnRun → UpdateAll) - Codeunit 85 “Sales Post Batch via Job Queue” (1 call:
ProcessBatchInBackground → EnqueueSalesBatch) - Codeunit 88 “Sales Post via Job Queue” (1 call:
HandleOnCustomProcessing → EnqueueSalesDocWithUI)
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.