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

# Codeunit 1380 "Batch Processing Mgt."

> Codeunit 1380 "Batch Processing Mgt." in Base Application (Microsoft.Foundation.BatchProcessing). 25 public procedures, 23 events. Present since at least BC23, still in BC30, changed in BC25.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Batch Processing Parameter" = rimd, TableData "Batch Processing Session Map" = rimd |

## Events published

- `OnVerifyRecord(var RecRef: RecordRef; var Result: Boolean)` (integration)
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) CheckSalesHeaderOnVerifyRecord, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) CheckPurchaseHeaderOnVerifyRecord
- `OnBeforeBatchProcess(var RecRef: RecordRef)` (integration)
- `OnBeforeBatchProcessGenJournalLine(var GenJournalLine: Record "Gen. Journal Line")` (integration)
- `OnBeforeBatchProcessing(var RecRef: RecordRef; var BatchConfirm: Option)` (integration)
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) PrepareSalesHeaderOnBeforeBatchProcessing, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) PreparePurchaseHeaderOnBeforeBatchProcessing
- `OnBeforeSetParametersForPageID(PageID: Integer; var IsHandled: Boolean)` (integration)
- `OnAfterBatchProcess(var RecRef: RecordRef; var CounterPosted: Integer; ProcessingCodeunitID: Integer)` (integration)
- `OnAfterBatchProcessing(var RecRef: RecordRef; PostingResult: Boolean)` (integration)
  - subscribers: [Codeunit 1373 "Batch Posting Print Mgt."](../codeunit/1373.md) PrintDocumentOnAfterBatchPosting
- `OnCustomProcessing(var RecRef: RecordRef; var Handled: Boolean; var KeepParameters: Boolean)` (integration)
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) HandleOnCustomProcessing, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) HandleOnCustomProcessing
- `OnBatchProcessOnBeforeShowMessage(CounterPosted: Integer; CounterTotal: Integer; var IsHandled: Boolean; var ErrorMessageHandler: Codeunit "Error Message Handler"; var ErrorMessageMgt: Codeunit "Error Message Management"; FullBatchProcessed: Boolean)` (integration)
- `OnBatchProcessOnBeforeResetBatchID(var RecRef: RecordRef; ProcessingCodeunitID: Integer)` (integration)
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) OnBatchProcessOnBeforeResetBatchID, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) OnBatchProcessOnBeforeResetBatchID
- `OnBatchProcessOnAfterIncreaseCounterPosted(var RecRef: RecordRef; ProcessingCodeunitID: Integer)` (integration)
- `OnBeforeBatchShouldBeProcessedInBackground(var RecRef: RecordRef; var IsProcessed: Boolean)` (integration)
- `OnIsPostWithJobQueueEnabled(var Result: Boolean)` (integration)
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) OnIsPostWithJobQueueEnabledHandler, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) OnIsPostWithJobQueueEnabledHandler
- `OnSetParameterOnBeforeParameterInsert(BatchProcessingParameter: Record "Batch Processing Parameter"; var IsProcessed: Boolean)` (integration)
- `OnProcessBatchInBackground(var RecRef: RecordRef; var SkippedRecordExists: Boolean)` (integration)
  - subscribers: [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) OnProcessBatchInBackgroundHandler, [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) OnProcessBatchInBackgroundHandler
- `OnSystemSetBatchProcessingActive(var Result: Boolean)` (internal)
  - subscribers: [Codeunit 1383 "Batch Processing Mgt. Handler"](../codeunit/1383.md) SetTrueOnSystemSetBatchProcessingActive
- `OnGetICBatchFileName(var Result: Text)` (integration)
- `OnAddArtifact(BatchID: Guid; ArtifactType: Enum "Batch Processing Artifact Type"; ArtifactName: Text[1024]; var TempBlobArtifactValue: Codeunit "Temp Blob")` (internal)
  - subscribers: [Codeunit 1383 "Batch Processing Mgt. Handler"](../codeunit/1383.md) HandleOnAddArtifact
- `OnHasArtifacts(ArtifactType: Enum "Batch Processing Artifact Type"; var Result: Boolean)` (internal)
  - subscribers: [Codeunit 1383 "Batch Processing Mgt. Handler"](../codeunit/1383.md) HandleOnHasArtifacts
- `OnGetArtifacts(ArtifactType: Enum "Batch Processing Artifact Type"; var TempBatchProcessingArtifactResult: Record "Batch Processing Artifact" temporary; var Result: Boolean)` (internal)
  - subscribers: [Codeunit 1383 "Batch Processing Mgt. Handler"](../codeunit/1383.md) HandleOnGetArtifacts
- `OnInvokeProcessingOnBeforeRunProcessingCodeunitID(RecordRef: RecordRef)` (integration)
- `OnInvokeProcessingOnAfterRunProcessingCodeunitID(RecordRef: RecordRef)` (integration)
- `OnSetParametersForPageIDOnAfterCalcDoInvoice(var PageID: Integer; var DoInvoicePurchase: Boolean; var DoInvoiceSales: Boolean)` (integration)

## Procedures

- `BatchProcess(var RecRef: RecordRef)`
- `BatchProcess(SourceRecord: Variant; SourceRecordProcessingCodeunitId: Integer; ErrorHandlingOptions: Enum "Error Handling Options"; NoSelected: Integer; NoSkipped: Integer)`
- `BatchProcess(var RecRef: RecordRef; ErrorHandlingOptions: Enum "Error Handling Options")`
- `BatchProcessGenJournalLine(var GenJournalLine: Record "Gen. Journal Line"; PostingCodeunitId: Integer)`
- `FillBatchProcessingMap(var RecRef: RecordRef)`
- `GetErrorMessages(var TempErrorMessageResult: Record "Error Message" temporary)`
- `ResetBatchID()`
- `AddArtifact(ArtifactType: Enum "Batch Processing Artifact Type"; ArtifactName: Text[1024]; var TempBlobArtivactValue: Codeunit "Temp Blob")`
- `HasArtifacts(ArtifactType: Enum "Batch Processing Artifact Type"): Boolean`
- `GetArtifacts(ArtifactType: Enum "Batch Processing Artifact Type"; var TempBatchProcessingArtifact: Record "Batch Processing Artifact" temporary): Boolean`
- `DeleteBatchProcessingSessionMapForRecordId(RecordIdToClean: RecordId)`
- `SetParameter(ParameterId: Enum "Batch Posting Parameter Type"; Value: Variant)`
- `SetParametersForPageID(PageID: Integer)`
- `GetTextParameter(RecordID: RecordID; ParameterId: Enum "Batch Posting Parameter Type"; var ParameterValue: Text[250]): Boolean`
- `GetBooleanParameter(RecordID: RecordID; ParameterId: Enum "Batch Posting Parameter Type"; var ParameterValue: Boolean): Boolean`
- `GetIntegerParameter(RecordID: RecordID; ParameterId: Enum "Batch Posting Parameter Type"; var ParameterValue: Integer): Boolean`
- `GetDateParameter(RecordID: RecordID; ParameterId: Enum "Batch Posting Parameter Type"; var ParameterValue: Date): Boolean`
- `GetTimeParameter(RecordID: RecordID; ParameterId: Enum "Batch Posting Parameter Type"; var ParameterValue: Time): Boolean`
- `IsActive(): Boolean`
- `GetIsCustomProcessingHandled(): Boolean`
- `GetKeepParameters(): Boolean`
- `GetRecRefForCustomProcessing(var RecRef: RecordRef)`
- `GetBatchFromSession(SourceRecordID: RecordID; SourceSessionID: Integer)`
- `SetRecRefForCustomProcessing(RecRef: RecordRef)`
- `SetProcessingCodeunit(NewProcessingCodeunitID: Integer)`

Plus 11 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 28 "Error Message Management"](../codeunit/28.md) (6 calls: `BatchProcessGenJournalLine → Activate`, `CanProcessRecord → LogError`, `GetErrorMessages → GetErrors`, …)
- [Codeunit 29 "Error Message Handler"](../codeunit/29.md) (1 call: `BatchProcessGenJournalLine → ShowErrors`)
- [Codeunit 431 "IC Outbox Export"](../codeunit/431.md) (1 call: `BatchProcessGenJournalLine → DownloadBatchFiles`)

## Called by

- [Codeunit 1371 "Sales Batch Post Mgt."](../codeunit/1371.md) (9 calls: `Code → BatchProcess`, `Code → SetProcessingCodeunit`, `PrepareSalesHeader → GetBooleanParameter`, …)
- [Codeunit 1372 "Purchase Batch Post Mgt."](../codeunit/1372.md) (9 calls: `Code → BatchProcess`, `Code → SetProcessingCodeunit`, `PreparePurchaseHeader → GetBooleanParameter`, …)
- [Codeunit 431 "IC Outbox Export"](../codeunit/431.md) (4 calls: `AddBatchProcessingArtifact → AddArtifact`, `AddBatchProcessingArtifact → IsActive`, `DownloadBatchFiles → GetArtifacts`, …)
- [Codeunit 7092 "Expense Report Batch Post Mgt."](../codeunit/7092.md) (3 calls: `Code → BatchProcess`, `Code → SetProcessingCodeunit`, `RunWithUI → ResetBatchID`)
- [Codeunit 88 "Sales Post via Job Queue"](../codeunit/88.md) (3 calls: `OnRun → DeleteBatchProcessingSessionMapForRecordId`, `OnRun → GetBatchFromSession`, `OnRun → ResetBatchID`)
- [Codeunit 98 "Purchase Post via Job Queue"](../codeunit/98.md) (3 calls: `OnRun → DeleteBatchProcessingSessionMapForRecordId`, `OnRun → GetBatchFromSession`, `OnRun → ResetBatchID`)
- [Codeunit 80 "Sales-Post"](../codeunit/80.md) (2 calls: `ValidatePostingAndDocumentDate → GetBooleanParameter`, `ValidatePostingAndDocumentDate → GetDateParameter`)
- [Codeunit 90 "Purch.-Post"](../codeunit/90.md) (2 calls: `ValidatePostingAndDocumentDate → GetBooleanParameter`, `ValidatePostingAndDocumentDate → GetDateParameter`)
- [Codeunit 900 "Assembly-Post"](../codeunit/900.md) (2 calls: `ValidatePostingDate → GetBooleanParameter`, `ValidatePostingDate → GetDateParameter`)
- [Table 36 "Sales Header"](../table/36.md) (2 calls: `PerformManualRelease → BatchProcess`, `PerformManualReopen → BatchProcess`)
- [Table 38 "Purchase Header"](../table/38.md) (2 calls: `PerformManualRelease → BatchProcess`, `PerformManualReopen → BatchProcess`)
- [Codeunit 1373 "Batch Posting Print Mgt."](../codeunit/1373.md) (1 call: `PrintDocumentOnAfterBatchPosting → GetBooleanParameter`)
- [Codeunit 1535 "Approvals Mgmt."](../codeunit/1535.md) (1 call: `SendJournalLinesApprovalRequests → BatchProcess`)
- [Table 6900 "Expense"](../table/6900.md) (1 call: `PerformManualReopen → BatchProcess`)
- [Table 6906 "Expense Report Header"](../table/6906.md) (1 call: `PerformManualReopen → BatchProcess`)
- [Table 81 "Gen. Journal Line"](../table/81.md) (1 call: `SendToPosting → BatchProcessGenJournalLine`)

## Across versions

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

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