---
id: object/codeunit/240
type: object
title: Codeunit 240 "ItemJnlManagement"
summary: Codeunit 240 "ItemJnlManagement" in Base Application (Microsoft.Inventory.Journal). 9 public procedures, 12 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28-29.
tier: official
language: en
tags:
  - codeunit
  - base application
versions:
  introduced: null
  last_changed: "29"
  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: 846471e2fc15d8dd995fc1a68978ada093ce15bf7479fbe51b6ec881ee8694ad
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Inventory/Journal/ItemJnlManagement.Codeunit.al
    title: src/Layers/W1/BaseApp/Inventory/Journal/ItemJnlManagement.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: 240
name: ItemJnlManagement
namespace: Microsoft.Inventory.Journal
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "26"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 21
  events: 12
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 0
  called_by: 14
  implements: 0
---

# Codeunit 240 "ItemJnlManagement"

> Codeunit 240 "ItemJnlManagement" in Base Application (Microsoft.Inventory.Journal). 9 public procedures, 12 events. Present since at least BC23, still in BC30, changed in BC24-26, BC28-29.

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

## Properties

| Property | Value |
|---|---|
| Permissions | TableData "Item Journal Template" = rimd, TableData "Item Journal Batch" = rimd |

## Events published

- `OnBeforeCheckName(CurrentJnlBatchName: Code[10]; var ItemJnlLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration)
- `OnBeforeCheckTemplateName(CurrentJnlTemplateName: Code[10]; var CurrentJnlBatchName: Code[10]; var ItemJournalBatch: Record "Item Journal Batch")` (integration)
- `OnBeforeLookupName(var ItemJnlBatch: Record "Item Journal Batch"; var IsHandled: Boolean; var CurrentJnlBatchName: Code[10]; var ItemJournalLine: Record "Item Journal Line")` (integration)
- `OnBeforeOpenJnl(var CurrentJnlBatchName: Code[10]; var ItemJnlLine: Record "Item Journal Line")` (integration)
- `OnOpenJnlBatchOnBeforeCaseSelectItemJnlTemplate(var ItemJnlTemplate: Record "Item Journal Template"; var ItemJnlBatch: Record "Item Journal Batch")` (integration)
- `OnTemplateSelectionSetFilter(var ItemJnlTemplate: Record "Item Journal Template"; var PageTemplate: Option)` (integration)
  - subscribers: [Codeunit 20439 "Qlty. Item Tracking Mgmt."](../codeunit/20439.md) HandleOnTemplateSelectionSetFilter
- `OnAfterGetItem(Item: Record Item; var ItemDescription: Text[100])` (integration)
- `OnSetNameOnAfterAppliesFilterOnItemJnlLine(var ItemJournalLine: Record "Item Journal Line"; CurrentJnlBatchName: Code[10])` (integration)
- `OnBeforeExitItemJnlBatchGetFilter(var ItemJnlBatch: record "Item Journal Batch")` (integration)
- `OnBeforeTemplateSelection(var ItemJnlLine: Record "Item Journal Line"; var JnlSelected: Boolean)` (integration)
- `OnTemplateSelectionOnAfterSelectItemJnlTemplate(var ItemJournalTemplate: Record "Item Journal Template"; var ItemJournalLine: Record "Item Journal Line"; var JnlSelected: Boolean)` (integration)
- `OnOpenJnlBatchOnAfterSelectItemJnlTemplate(var ItemJournalTemplate: Record "Item Journal Template"; var ItemJournalBatch: Record "Item Journal Batch")` (integration)

## Procedures

- `TemplateSelection(PageID: Integer; PageTemplate: Option Item,Transfer,"Phys. Inventory",Revaluation,Consumption,Output,Capacity,"Prod. Order"; RecurringJnl: Boolean; var ItemJnlLine: Record "Item Journal Line"; var JnlSelected: Boolean)`
- `TemplateSelectionFromBatch(var ItemJnlBatch: Record "Item Journal Batch")`
- `OpenJnl(var CurrentJnlBatchName: Code[10]; var ItemJnlLine: Record "Item Journal Line")`
- `OpenJnlBatch(var ItemJnlBatch: Record "Item Journal Batch")`
- `CheckTemplateName(CurrentJnlTemplateName: Code[10]; var CurrentJnlBatchName: Code[10])`
- `CheckName(CurrentJnlBatchName: Code[10]; var ItemJnlLine: Record "Item Journal Line")`
- `SetName(CurrentJnlBatchName: Code[10]; var ItemJnlLine: Record "Item Journal Line")`
- `LookupName(var CurrentJnlBatchName: Code[10]; var ItemJnlLine: Record "Item Journal Line")`
- `GetItem(ItemNo: Code[20]; var ItemDescription: Text[100])`

## Triggers

OnRun

## Called by

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.

- [Page 286 "Recurring Item Jnl."](../page/286.md) (5 calls: `CurrentJnlBatchNameOnAfterVali → SetName`, `ItemNoOnAfterValidate → GetItem`, `OnAfterGetCurrRecord → GetItem`, …)
- [Page 392 "Phys. Inventory Journal"](../page/392.md) (5 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `ItemNoOnAfterValidate → GetItem`, `OnAfterGetCurrRecord → GetItem`, …)
- [Page 393 "Item Reclass. Journal"](../page/393.md) (5 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `ItemNoOnAfterValidate → GetItem`, `OnAfterGetCurrRecord → GetItem`, …)
- [Page 40 "Item Journal"](../page/40.md) (5 calls: `CurrentJnlBatchNameOnAfterVali → SetName`, `ItemNoOnAfterValidate → GetItem`, `OnAfterGetCurrRecord → GetItem`, …)
- [Page 5803 "Revaluation Journal"](../page/5803.md) (5 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `ItemNoOnAfterValidate → GetItem`, `OnAfterGetCurrRecord → GetItem`, …)
- [Page 99000773 "Capacity Journal"](../page/99000773.md) (3 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `OnOpenPage → OpenJnl`, `OnOpenPage → TemplateSelection`)
- [Page 99000778 "Recurring Capacity Journal"](../page/99000778.md) (3 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `OnOpenPage → OpenJnl`, `OnOpenPage → TemplateSelection`)
- [Page 99000823 "Output Journal"](../page/99000823.md) (3 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `OnOpenPage → OpenJnl`, `OnOpenPage → TemplateSelection`)
- [Page 99000827 "Recurring Output Journal"](../page/99000827.md) (3 calls: `CurrentJnlBatchNameOnAfterVali → SetName`, `OnOpenPage → OpenJnl`, `OnOpenPage → TemplateSelection`)
- [Page 99000846 "Consumption Journal"](../page/99000846.md) (3 calls: `CurrentJnlBatchNameOnAfterValidate → SetName`, `OnOpenPage → OpenJnl`, `OnOpenPage → TemplateSelection`)
- [Page 99000850 "Recurring Consumption Journal"](../page/99000850.md) (3 calls: `CurrentJnlBatchNameOnAfterVali → SetName`, `OnOpenPage → OpenJnl`, `OnOpenPage → TemplateSelection`)
- [Table 20400 "Qlty. Management Setup"](../table/20400.md) (2 calls: `GetInventoryAdjustmentJournalTemplate → TemplateSelection`, `GetItemReclassJournalTemplate → TemplateSelection`)
- [Codeunit 1327 "Adjust Item Inventory"](../codeunit/1327.md) (1 call: `SelectItemTemplateForAdjustment → TemplateSelection`)
- [Page 262 "Item Journal Batches"](../page/262.md) (1 call: `OnOpenPage → OpenJnlBatch`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-26, BC28-29

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