---
id: change/bcapps/12291
type: change
title: "#12291 [Quality Management] Pass the single tracking record and clear the right filter in the purchase receipt subscriber"
summary: Fixes two defects in the Quality Management purchase receipt subscriber. Filter cleanup now clears Quantity Handled (Base), so later posting event subscribers no longer get a filtered buffer. Inspection creation on the tracked path now receives the single-record buffer instead of the full posting buffer.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit qlty. receiving integration
system: inventory
review:
  state: reviewed
  by: opus
  at: "2026-11-20T00:57:46.522Z"
  flags: []
generated:
  at: "2026-11-25T00:13:20.045Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: a9ef0052c43b36023e60e8442c7c827c42a77667
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12291
    title: "microsoft/BCApps#12291: [Quality Management] Pass the single tracking record and clear the right filter in the purchase receipt subscriber"
    date: "2026-11-17"
    commit: a9ef0052c43b36023e60e8442c7c827c42a77667
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/20411
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/design-details-active-versus-historic-item-tracking-entries
      title: Design details - Active versus historic item tracking entries
      label: possibly related
      why: Documents item tracking entries in purchase receipts and how tracking records flow through receiving.
      by: model
number: 12291
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12291
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-17T11:49:23Z"
author: Franco111000
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - "AL: Apps (W1)"
  - Approved
  - From Fork
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 3
  additions: 192
  deletions: 2
  al: 1
apps:
  - Quality Management
objects_touched:
  - key: codeunit/20411
    page: codeunit/20411
    type: codeunit
    id: 20411
    name: Qlty. Receiving Integration
    app: Quality Management
    status: modified
objects_unjoined: []
obsoletions: []
backports: []
fixes_issues:
  - 9979
work_items:
  - 659622
systems:
  - inventory
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #12291 [Quality Management] Pass the single tracking record and clear the right filter in the purchase receipt subscriber

> Fixes two defects in the Quality Management purchase receipt subscriber. Filter cleanup now clears Quantity Handled (Base), so later posting event subscribers no longer get a filtered buffer. Inspection creation on the tracked path now receives the single-record buffer instead of the full posting buffer.

[Pull request](https://github.com/microsoft/BCApps/pull/12291) · merged into `main` (BC30) on 2026-11-17 by Franco111000 (community contribution) · 3 files (+192 -2), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Filter cleanup clears Quantity Handled (Base) instead of Qty. to Invoice (Base)
- Later posting events such as OnBeforeInsertTrackingSpecification no longer see a leftover filter on the tracking buffer
- On the tracked path, subscribers of the OnBefore/OnAfterPurchaseAttemptCreateInspectionWithPurchaseLine events now see only the tracking record being inspected
- The inspections created and the posted data are unchanged
- Adds two tests and a manually bound test subscriber codeunit
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 20411 "Qlty. Receiving Integration"](../../objects/codeunit/20411.md), Quality Management: modified

## Context

- Fixes: [#9979 [Bug]: [Quality Management] Tracking specification buffer defects in HandleOnAfterPurchRcptLineInsert](https://github.com/microsoft/BCApps/issues/9979) (closed)
- Work items: AB#659622
- Labels: ADO: Sync, AL: Apps (W1), Approved, From Fork, Team: SCM
- Systems: inventory

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Design details - Active versus historic item tracking entries](https://learn.microsoft.com/dynamics365/business-central/design-details-active-versus-historic-item-tracking-entries) — possibly related: Documents item tracking entries in purchase receipts and how tracking records flow through receiving. (model-linked)

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).
