---
id: object/codeunit/23
type: object
title: Codeunit 23 "Item Jnl.-Post Batch"
summary: Codeunit 23 "Item Jnl.-Post Batch" in Base Application (Microsoft.Inventory.Posting). 5 public procedures, 58 events, 7 event subscribers. Present since at least BC23, still in BC30, changed in BC25-28, BC30.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "30"
  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: a0b71492e58e4ebbb68ff6a7057e64d3d10a0a6a5f921c4e77d68289c8c7f53f
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostBatch.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Posting/ItemJnlPostBatch.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12066
object_type: codeunit
object_id: 23
name: Item Jnl.-Post Batch
namespace: Microsoft.Inventory.Posting
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "25"
  - "26"
  - "27"
  - "28"
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 99
  events: 58
  subscribers: 7
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 4
  calls: 13
  called_by: 14
  implements: 0
---

# Codeunit 23 "Item Jnl.-Post Batch"

> Codeunit 23 "Item Jnl.-Post Batch" in Base Application (Microsoft.Inventory.Posting). 5 public procedures, 58 events, 7 event subscribers. Present since at least BC23, still in BC30, changed in BC25-28, BC30.

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

## Properties

| Property | Value |
|---|---|
| TableNo | Item Journal Line |
| Permissions | TableData "Item Journal Batch" = rimd, TableData "Warehouse Register" = r, TableData "Value Entry" = rm |

## Events published

- `OnAfterCheckLines(var ItemJnlLine: Record "Item Journal Line")` (integration)
- `OnAfterCheckJnlLine(var ItemJournalLine: Record "Item Journal Line"; CommitIsSuppressed: Boolean)` (integration)
- `OnAfterCode(var ItemJournalLine: Record "Item Journal Line"; ItemJournalBatch: Record "Item Journal Batch"; ItemRegNo: Integer; WhseRegNo: Integer)` (integration)
- `OnAfterConstructPostingNumber(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnAfterCopyRegNos(var ItemJournalLine: Record "Item Journal Line"; var ItemRegNo: Integer; var WhseRegNo: Integer)` (integration)
- `OnAfterGetLocation(var Location: Record Location; var ItemJnlLine: Record "Item Journal Line")` (integration)
- `OnAfterItemJnlPostSumLine(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnBeforePostLines(var ItemJournalLine: Record "Item Journal Line"; var ItemRegNo: Integer; var WhseRegNo: Integer)` (integration)
  - subscribers: [Codeunit 99000823 "Mfg. Item Jnl.-Post Batch"](../codeunit/99000823.md) OnBeforePostLines
- `OnBeforeValidateDocumentNo(var ItemJournalLine: Record "Item Journal Line"; var ItemJournalBatch: Record "Item Journal Batch"; LastDocNo2: Code[20]; var IsHandled: Boolean)` (integration)
- `OnAfterPostLines(var ItemJournalLine: Record "Item Journal Line"; var ItemRegNo: Integer; var WhseRegNo: Integer)` (integration)
  - subscribers: [Codeunit 99000823 "Mfg. Item Jnl.-Post Batch"](../codeunit/99000823.md) OnAfterPostLines
- `OnAfterPostJnlLines(var ItemJournalBatch: Record "Item Journal Batch"; var ItemJournalLine: Record "Item Journal Line"; ItemRegNo: Integer; WhseRegNo: Integer; var WindowIsOpen: Boolean)` (integration)
- `OnAfterPostWhseJnlLine(ItemJournalLine: Record "Item Journal Line"; CommitIsSuppressed: Boolean)` (integration)
- `OnAfterUpdateAnalysisViews(var ItemRegister: Record "Item Register")` (integration)
- `OnBeforeCode(var ItemJournalLine: Record "Item Journal Line"; var ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnBeforeCheckItemAvailability(var ItemJournalLine: Record "Item Journal Line"; var StockkeepingUnit: Record "Stockkeeping Unit")` (integration)
- `OnBeforeCheckItemAvailabilityHandled(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckLines(var ItemJnlLine: Record "Item Journal Line"; var WindowIsOpen: Boolean)` (integration)
- `OnBeforeCheckWMSBin(ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeOpenProgressDialog(var ItemJnlLine: Record "Item Journal Line"; var Window: Dialog; var WindowIsOpen: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforePostWhseJnlLines(ItemJnlLine: Record "Item Journal Line"; var TempTrackingSpecification: Record "Tracking Specification" temporary; ItemJnlTemplateType: Enum "Item Journal Template Type"; ToTransfer: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeRaiseExceedLengthError(var ItemJournalBatch: Record "Item Journal Batch"; var RaiseError: Boolean)` (integration)
- `OnBeforeWhseJnlPostLineRun(ItemJournalLine: Record "Item Journal Line"; var TempWarehouseJournalLine: Record "Warehouse Journal Line" temporary; var IsHandled: Boolean)` (integration)
- `OnPostLinesOnAfterPostWhseJnlLine(var ItemJournalLine: Record "Item Journal Line"; CommitIsSuppressed: Boolean)` (integration)
- `OnPostLinesBeforePostWhseJnlLine(var ItemJournalLine: Record "Item Journal Line"; CommitIsSuppressed: Boolean)` (integration)
- `OnBeforeHandleNonRecurringLine(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean; var OldEntryType: Enum "Item Ledger Entry Type")` (integration)
- `OnBeforeHandleRecurringLine(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeIncrBatchName(var ItemJournalLine: Record "Item Journal Line"; var IncrBatchName: Boolean)` (integration)
- `OnBeforeItemJnlPostSumLine(var ItemJournalLine: Record "Item Journal Line"; ItemLedgerEntry: Record "Item Ledger Entry")` (integration)
- `OnBeforeUpdateDeleteLines(var ItemJournalLine: Record "Item Journal Line"; var ItemRegNo: Integer; var WhseRegNo: Integer)` (integration)
- `OnCodeOnBeforePostLines(var ItemJournalLine: Record "Item Journal Line"; var NoOfRecords: Integer)` (integration)
- `OnHandleNonRecurringLineOnInsertNewLine(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnItemJnlPostSumLineOnAfterGetItem(var Item: Record Item; ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnItemJnlPostSumLineOnAfterCalcThrowPostingsExistError(var ItemJournalLine: Record "Item Journal Line"; RemQuantity: Decimal; var ThrowPostingsExistError: Boolean)` (integration)
- `OnItemJnlPostSumLineOnBeforeIncludeEntry(var ItemJournalLine: Record "Item Journal Line"; ItemLedgEntry: Record "Item Ledger Entry"; var IncludeExpectedCost: Boolean)` (integration)
- `OnItemJnlPostSumLineOnBeforeCalcAppliedAmount(var ItemJournalLine: Record "Item Journal Line"; ItemLedgEntry: Record "Item Ledger Entry")` (integration)
- `OnPostLinesOnAfterPostLine(var ItemJournalLine: Record "Item Journal Line"; var SuppressCommit: Boolean)` (integration)
- `OnPostLinesOnBeforePostLine(var ItemJournalLine: Record "Item Journal Line"; var SuppressCommit: Boolean; var WindowIsOpen: Boolean)` (integration)
- `OnPostWhseJnlLineOnBeforeCreateWhseJnlLines(ItemJournalLine: Record "Item Journal Line"; var ItemJnlTemplateType: Option; var IsHandled: Boolean)` (integration)
- `OnHandleRecurringLineOnBeforeItemJnlLineModify(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnHandleRecurringLineOnBeforeItemJnlLine2Loop(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlLine2: Record "Item Journal Line"; var WindowIsOpen: Boolean)` (integration)
- `OnBeforeInsertTempSKU(var TempStockkeepingUnit: Record "Stockkeeping Unit" temporary; ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnHandleNonRecurringLineOnAfterItemJnlLineModify(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnBeforeSelfReservedQty(SKU: Record "Stockkeeping Unit"; ItemJnlLine: Record "Item Journal Line"; var Result: Decimal; var IsHandled: Boolean)` (integration, obsolete 27.0)
- `OnHandleNonRecurringLineOnBeforeSetItemJnlBatchName(ItemJnlTemplate: Record "Item Journal Template"; var IsHandled: Boolean)` (integration)
- `OnHandleNonRecurringLineOnAfterCopyItemJnlLine3(var ItemJournalLine: Record "Item Journal Line"; var ItemJournalLine3: Record "Item Journal Line")` (integration)
- `OnBeforeCheckJnlLine(var ItemJournalLine: Record "Item Journal Line"; SuppressCommit: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforePostJnlLine(var ItemJournalLine: Record "Item Journal Line"; SuppressCommit: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeConstructPostingNumber(var ItemJournalLine: Record "Item Journal Line"; ItemJnlBatch: Record "Item Journal Batch"; var LastDocNo: Code[20]; var LastPostedDocNo: Code[20]; var IsHandled: Boolean)` (integration)
- `OnBeforeUpdateItemTracking(var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeItemJournalPostSumLine(var ItemJnlLine: Record "Item Journal Line"; var ItemJnlLine4: Record "Item Journal Line"; var LineCount: Integer; WindowIsOpen: Boolean; var Window: Dialog; NoOfRecords: Integer; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeOnRun(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnAfterOnRun(var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnBeforeOnPostLinesOnBeforePostLineUpdateItemTracking(var ItemJnlLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnAfterUpdateStdCostSKUValidate(var ItemJnlLine: Record "Item Journal Line"; var SKU: Record "Stockkeeping Unit")` (integration)
- `OnBeforeCheckRemainingQty(var ItemJnlLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnHandleWhsePutAwayForProdOutput(var ItemJnlLine: Record "Item Journal Line")` (internal)
  - subscribers: [Codeunit 99000823 "Mfg. Item Jnl.-Post Batch"](../codeunit/99000823.md) OnHandleWhsePutAwayForProdOutput
- `OnCheckItemAvailabilityOnAfterSetAvailableQty(var TempSKU: Record "Stockkeeping Unit" temporary; var ItemJnlLine: Record "Item Journal Line"; var AvailableQty: Decimal)` (internal)
  - subscribers: [Codeunit 99000823 "Mfg. Item Jnl.-Post Batch"](../codeunit/99000823.md) OnCheckItemAvailabilityOnAfterSetAvailableQty
- `OnAfterIncludeEntryInCalc(ItemLedgEntry: Record "Item Ledger Entry"; PostingDate: Date; IncludeExpectedCost: Boolean; var ShouldIncludeEntryInCalc: Boolean)` (integration)

## Event subscriptions

- OnBeforePostValueEntryToGL subscribes to Codeunit "Item Jnl.-Post Line" OnBeforePostValueEntryToGL
- OnAfterInsertItemLedgEntry subscribes to Codeunit "Item Jnl.-Post Line" OnAfterInsertItemLedgEntry
- OnAfterInsertValueEntry subscribes to Codeunit "Item Jnl.-Post Line" OnAfterInsertValueEntry
- OnAfterInsertPhysInventoryEntry subscribes to Codeunit "Item Jnl.-Post Line" OnAfterInsertPhysInventoryEntry
- OnAfterInsertCapLedgEntry subscribes to Codeunit "Item Jnl.-Post Line" OnAfterInsertCapLedgEntry
- OnAfterInsertWhseEntry subscribes to Codeunit "Whse. Jnl.-Register Line" OnAfterInsertWhseEntry
- OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem subscribes to Codeunit "Item Jnl.-Post Line" OnSetItemAdjmtPropertiesOnBeforeCheckModifyItem

## Procedures

- `PostWhseJnlLine(ItemJnlLine: Record "Item Journal Line"; OriginalQuantity: Decimal; OriginalQuantityBase: Decimal; var TempTrackingSpecification: Record "Tracking Specification" temporary)`
- `GetWhseRegNo(): Integer`
- `GetItemRegNo(): Integer`
- `SetSuppressCommit(NewSuppressCommit: Boolean)`
- `RunOnBeforeSelfReservedQty(SKU: Record "Stockkeeping Unit"; ItemJnlLine2: Record "Item Journal Line"; var Result: Decimal; var IsHandled: Boolean)` (internal)

Plus 29 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 83 "Item Journal Line"](../table/83.md)

## 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 22 "Item Jnl.-Post Line"](../codeunit/22.md) (5 calls: `Code → PostDeferredValueEntriesToGL`, `ItemJnlPostSumLine → RunWithCheck`, `PostLines → CheckItemTracking`, …)
- [Codeunit 308 "No. Series - Batch"](../codeunit/308.md) (3 calls: `Code → SaveState`, `ConstructPostingNumber → GetNextNo`, `PostLines → GetNextNo`)
- [Codeunit 7302 "WMS Management"](../codeunit/7302.md) (3 calls: `CheckWMSBin → CheckAdjmtBin`, `PostWhseJnlLines → CheckWhseJnlLine`, `PostWhseJnlLines → CreateWhseJnlLine`)
- [Codeunit 7380 "Phys. Invt. Count.-Management"](../codeunit/7380.md) (3 calls: `Code → UpdateItemSKUListPhysInvtCount`, `PostLines → AddToTempItemSKUList`, `PostLines → InitTempItemSKUList`)
- [Codeunit 21 "Item Jnl.-Check Line"](../codeunit/21.md) (1 call: `CheckLines → RunCheck`)
- [Codeunit 27 "Confirm Management"](../codeunit/27.md) (1 call: `CheckItemAvailability → GetResponseOrDefault`)
- [Codeunit 410 "Update Analysis View"](../codeunit/410.md) (1 call: `Code → UpdateAll`)
- [Codeunit 447 "Record Link Management"](../codeunit/447.md) (1 call: `HandleNonRecurringLine → RemoveLinks`)
- [Codeunit 5894 "Inventory Adjustment Handler"](../codeunit/5894.md) (1 call: `MakeInventoryAdjustment → MakeAutomaticInventoryAdjustment`)
- [Codeunit 6500 "Item Tracking Management"](../codeunit/6500.md) (1 call: `PostWhseJnlLines → SplitWhseJnlLine`)
- [Codeunit 7150 "Update Item Analysis View"](../codeunit/7150.md) (1 call: `Code → UpdateAll`)
- [Codeunit 7301 "Whse. Jnl.-Register Line"](../codeunit/7301.md) (1 call: `PostWhseJnlLines → (object)`)
- [Codeunit 9500 "Sequence No. Mgt."](../codeunit/9500.md) (1 call: `CheckLines → AllocateSeqNoBuffer`)

## Called by

- [Codeunit 242 "Item Jnl.-Post+Print"](../codeunit/242.md) (4 calls: `Code → (object)`, `Code → GetItemRegNo`, `Code → GetWhseRegNo`, …)
- [Codeunit 244 "Item Jnl.-B.Post+Print"](../codeunit/244.md) (3 calls: `Code → (object)`, `Code → GetItemRegNo`, `Code → GetWhseRegNo`)
- [Codeunit 241 "Item Jnl.-Post"](../codeunit/241.md) (2 calls: `Code → (object)`, `Code → SetSuppressCommit`)
- [Codeunit 1327 "Adjust Item Inventory"](../codeunit/1327.md) (1 call: `PostItemJnlLines → (object)`)
- [Codeunit 20454 "Qlty. Item Journal Management"](../codeunit/20454.md) (1 call: `PostItemJournal → (object)`)
- [Codeunit 243 "Item Jnl.-B.Post"](../codeunit/243.md) (1 call: `Code → (object)`)
- [Codeunit 40108 "GP PO Migrator"](../codeunit/40108.md) (1 call: `PostItemAdjustments → (object)`)
- [Codeunit 4037 "Helper Functions"](../codeunit/4037.md) (1 call: `SafePostItemBatch → (object)`)
- [Codeunit 46949 "BC14 Item Journal Post Action"](../codeunit/46949.md) (1 call: `RunAction → (object)`)
- [Codeunit 47023 "SL Helper Functions"](../codeunit/47023.md) (1 call: `SafePostItemBatch → (object)`)
- [Codeunit 4779 "Create Mfg Item Jnl Line"](../codeunit/4779.md) (1 call: `OnRun → (object)`)
- [Codeunit 5110 "Create Svc Item Jnl Lines"](../codeunit/5110.md) (1 call: `OnRun → (object)`)
- [Codeunit 5189 "Create Job Item Jnl Lines"](../codeunit/5189.md) (1 call: `OnRun → (object)`)
- [Codeunit 5538 "Create Item Jnl Line"](../codeunit/5538.md) (1 call: `OnRun → (object)`)

## Recent changes

- 2026-10-02 [#12066 Bugs/remove asm inv mfg clean27 tags for wave2 2026](../../changes/bcapps/12066.md) (main, BC30, obsoletion)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC25-28, BC30

## Deprecations

- procedure RunOnBeforeSelfReservedQty: guarded (#if not CLEAN27)
- procedure OnBeforeSelfReservedQty: Pending 27.0 (#if not CLEAN27), "Moved to codeunit MfgItemJnlPostBatch"

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