---
id: change/bcapps/9523
type: change
title: "#9523 Issue #9474  OnBeforeDecreaseQtyForMaxQty"
summary: Adds an OnBeforeDecreaseQtyForMaxQty integration event to the Inventory Profile Offsetting codeunit, so extensions can hook in before the quantity is decreased for the maximum quantity.
tier: official
language: en
tags:
  - feature
  - main
  - bc30
  - codeunit inventory profile offsetting
system: inventory
review:
  state: reviewed
  by: opus
  at: "2026-11-13T00:59:24.081Z"
  flags: []
generated:
  at: "2026-11-13T00:13:31.718Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 4075867638fb5d9f735b41b46b86b92aa5300fe8
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/9523
    title: "microsoft/BCApps#9523: Issue #9474  OnBeforeDecreaseQtyForMaxQty"
    date: "2026-11-12"
    commit: 4075867638fb5d9f735b41b46b86b92aa5300fe8
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/99000854
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 9523
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/9523
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-12T21:45:58Z"
author: MiguelLM-Eyna
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: SCM"
  - event-request
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 1
  additions: 13
  deletions: 0
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/99000854
    page: codeunit/99000854
    type: codeunit
    id: 99000854
    name: Inventory Profile Offsetting
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 9474
work_items:
  - 647953
systems:
  - inventory
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #9523 Issue #9474  OnBeforeDecreaseQtyForMaxQty

> Adds an OnBeforeDecreaseQtyForMaxQty integration event to the Inventory Profile Offsetting codeunit, so extensions can hook in before the quantity is decreased for the maximum quantity.

[Pull request](https://github.com/microsoft/BCApps/pull/9523) · merged into `main` (BC30) on 2026-11-12 by MiguelLM-Eyna (community contribution) · 1 file (+13 -0), 1 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- New OnBeforeDecreaseQtyForMaxQty event in codeunit 99000854 Inventory Profile Offsetting
- Raised before the quantity is decreased for the maximum quantity
- Addresses event request issue #9474
- Additive change only (+13 lines), no existing code removed

## AL objects touched

- [Codeunit 99000854 "Inventory Profile Offsetting"](../../objects/codeunit/99000854.md), Base Application: modified

## Context

- Fixes: [#9474 [Extensibility Request] Add OnBeforeDecreaseQtyForMaxQty event in Codeunit 99000854 "Inventory Profile Offsetting"](https://github.com/microsoft/BCApps/issues/9474) (closed)
- Work items: AB#647953
- Labels: ADO: Sync, From Fork, 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).
