---
title: "Codeunit 1372 Purchase Batch Post Mgt."
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/1372-purchase-batch-post-mgt/
type: codeunit
id: 1372
name: "Purchase Batch Post Mgt."
app: "Base Application"
namespace: Microsoft.Purchases.Posting
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/1372-purchase-batch-post-mgt/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 1372 Purchase Batch Post Mgt.

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/1372-purchase-batch-post-mgt/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.Purchases.Posting |
| Versions | 17-28 |
| Source file | Purchases/Posting/PurchaseBatchPostMgt.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| RunBatch | (var Record Purchase Header, Boolean, Date, Boolean, Boolean, Boolean, Boolean) | - | public | 17-28 | - | - |
| RunWithUI | (var Record Purchase Header, Integer, Text) | - | public | 17-28 | - | - |
| GetBatchProcessor | (var Codeunit Batch Processing Mgt.) | - | public | 17-28 | - | - |
| SetBatchProcessor | (Codeunit Batch Processing Mgt.) | - | public | 17-28 | - | - |
| Code | (var Record Purchase Header) | - | public | 17-28 | - | - |
| SetPostingCodeunitId | (Integer) | - | public | 17-28 | - | - |
| AddParameter | (Integer, Variant) | - | public | 17-19 | Pending 17.0 | Replaced by SetParameter(). |
| SetParameter | (Enum Batch Posting Parameter Type, Variant) | - | public | 17-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterPreparePurchaseHeader | (var Record Purchase Header) | 17-28 | - | - |
| Integration event | OnAfterRunBatch | (var Record Purchase Header, var Record Error Message) | 17-28 | - | - |
| Integration event | OnBeforeRunBatch | (var Record Purchase Header, var Boolean, Date, Boolean, Boolean, Boolean) | 17-27 | - | - |
| Integration event | OnRunBatchOnAfterAddParameters | (var Codeunit Batch Processing Mgt.) | 17-28 | - | - |
| Integration event | OnGetICBatchFileName | (var Text) | 19-28 | - | - |
| Integration event | OnAfterReleasePurchaseHeader | (var Record Purchase Header, var Boolean) | 22-28 | - | - |
| Integration event | OnBeforeRunBatch | (var Record Purchase Header, var Boolean, var Date, var Boolean, Boolean, Boolean) | 28 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
