---
id: change/bcapps/9465
type: change
title: "#9465 [Extensibility Request] issue 30350: add OnBeforeTestFirstApplyItemLedgerEntryTracking event"
summary: A new integration event OnBeforeTestFirstApplyItemLedgerEntryTracking was added to codeunit 22 so extensions can validate item tracking and optionally modify the Item Tracking Code before standard validation runs.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit item jnl.-post line
system: inventory
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:09:56.755Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 777fcd98aee7cc430c7aed5740a9443ba7ca25c9
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9465
    title: "microsoft/BCApps#9465: [Extensibility Request] issue 30350: add OnBeforeTestFirstApplyItemLedgerEntryTracking event"
    date: "2026-08-10"
    commit: 777fcd98aee7cc430c7aed5740a9443ba7ca25c9
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/22
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9465
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9465
kind: pr
base_branch: main
major: "30"
merged_at: "2026-08-10T23:57:39Z"
author: AleksandricMarko
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
  - event-request
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 6
  additions: 42
  deletions: 6
  al: 6
apps:
  - Base Application
objects_touched:
  - key: codeunit/22
    page: codeunit/22
    type: codeunit
    id: 22
    name: Item Jnl.-Post Line
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/APAC/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/CH/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/ES/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/IT/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 642242
systems:
  - inventory
quote: null
joined_against:
  major: "30"
  commit: f18567dc08e2bd162bf192e1da4d714b57eb099f
---

# #9465 [Extensibility Request] issue 30350: add OnBeforeTestFirstApplyItemLedgerEntryTracking event

> A new integration event OnBeforeTestFirstApplyItemLedgerEntryTracking was added to codeunit 22 so extensions can validate item tracking and optionally modify the Item Tracking Code before standard validation runs.

[Pull request](https://github.com/microsoft/BCApps/pull/9465) · merged into `main` (BC30) on 2026-08-10 by AleksandricMarko · 6 files (+42 -6), 6 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New integration event raised at the start of TestFirstApplyItemLedgerEntryTracking in codeunit 22
- Lets extensions raise clearer, document-specific tracking errors
- Item Tracking Code is passed by var so subscribers can adjust it
- Makes it possible to skip lot checking in specific scenarios
- Added in W1 and mirrored to the CH, ES, IT, RU and APAC layers

## AL objects touched

- [Codeunit 22 "Item Jnl.-Post Line"](../../objects/codeunit/22.md), Base Application: modified
- `src/Layers/APAC/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/CH/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/ES/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al`: modified, not in the BC30 snapshot
- `src/Layers/IT/BaseApp/Inventory/Posting/ItemJnlPostLine.Codeunit.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#642242
- Labels: Team: SCM, event-request
- Systems: inventory

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
