---
id: object/codeunit/20407
type: object
title: Codeunit 20407 "Qlty. Manufactur. Integration"
summary: Codeunit 20407 "Qlty. Manufactur. Integration" in Quality Management (Microsoft.QualityManagement.Integration.Manufacturing). 6 events, 5 event subscribers. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - quality management
versions:
  introduced: "29"
  last_changed: null
  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: 1327bf0227b9533edd95d0320675b4da717ecc97223ffd5a4a32772de9bad14a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Integration/Manufacturing/QltyManufacturIntegration.Codeunit.al
    title: src/Apps/W1/Quality Management/app/src/Integration/Manufacturing/QltyManufacturIntegration.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/10270
    - change/bcapps/8556
object_type: codeunit
object_id: 20407
name: Qlty. Manufactur. Integration
namespace: Microsoft.QualityManagement.Integration.Manufacturing
app: Quality Management
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 22
  events: 6
  subscribers: 5
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 0
  implements: 0
---

# Codeunit 20407 "Qlty. Manufactur. Integration"

> Codeunit 20407 "Qlty. Manufactur. Integration" in Quality Management (Microsoft.QualityManagement.Integration.Manufacturing). 6 events, 5 event subscribers. Introduced in BC29, still in BC30.

Quality Management · Microsoft.QualityManagement.Integration.Manufacturing · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Integration/Manufacturing/QltyManufacturIntegration.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "Qlty. Management Setup" = r, tabledata "Qlty. Inspection Gen. Rule" = r, tabledata "Qlty. Inspection Header" = r |

## Events published

- `OnBeforeProductionAttemptCreatePostAutomaticInspection(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ProdOrderLine: Record "Prod. Order Line"; var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration): OnBeforeProductionAttemptCreatePostAutomaticInspection is called before attempting to automatically create an inspection for production related events prior to posting to posting.
- `OnAfterProductionAttemptCreateAutomaticInspection(var ProdOrderRoutingLine: Record "Prod. Order Routing Line"; var ItemLedgerEntry: Record "Item Ledger Entry"; var ProdOrderLine: Record "Prod. Order Line"; var ItemJournalLine: Record "Item Journal Line")` (integration): OnAfterProductionAttemptCreateAutomaticInspection is called after attempting to automatically create an inspection for production.
- `OnBeforeProductionAttemptCreateReleaseAutomaticInspection(var ProductionOrder: Record "Production Order"; var IsHandled: Boolean)` (integration): OnBeforeProductionAttemptCreateReleaseAutomaticInspection is called before attempting to automatically create an inspection for production related releasing.
- `OnAfterProductionAttemptCreateReleaseAutomaticInspection(var ProductionOrder: Record "Production Order"; CreatedAtLeastOneInspectionForRoutingLine: Boolean; CreatedAtLeastOneInspectionForOrderLine: Boolean; CreatedInspectionForProdOrder: Boolean; ListOfInspectionIds: List of [RecordId])` (integration): Notifies subscribers after release-triggered inspection creation has completed.
- `OnBeforeProductionHandleOnAfterPostOutput(var ItemLedgerEntry: Record "Item Ledger Entry"; var ProdOrderLine: Record "Prod. Order Line"; var ItemJournalLine: Record "Item Journal Line"; var IsHandled: Boolean)` (integration): Gives an opportunity to override any handle of onafterpostoutput. Use this to completely replace any automatic inspection creation on output and/or any automatic inspection validation on output
- `OnBeforeProductionHandleOnAfterChangeStatusOnProdOrder(var FromProductionOrder: Record "Production Order"; var ToProductionOrder: Record "Production Order"; var IsHandled: Boolean)` (integration): Gives an opportunity to supplement or replace automatic inspection creation on finish, and validation of inspections on finish.

## Event subscriptions

- HandleOnAfterPostOutput subscribes to Codeunit "Mfg. Item Jnl.-Post Line" OnAfterPostOutput
- HandleOnAfterChangeStatusOnProdOrder subscribes to Codeunit "Prod. Order Status Management" OnAfterChangeStatusOnProdOrder
- HandleOnAfterToProdOrderLineModify subscribes to Codeunit "Prod. Order Status Management" OnAfterToProdOrderLineModify
- HandleOnAfterToProdOrderRtngLineInsert subscribes to Codeunit "Prod. Order Status Management" OnAfterToProdOrderRtngLineInsert
- HandleOnAfterRefreshProdOrder subscribes to Report "Refresh Production Order" OnAfterRefreshProdOrder

## Procedures

11 local procedures, no public ones.

## 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 20404 "Qlty. Inspection - Create"](../codeunit/20404.md) (5 calls: `AttemptCreateInspectionPosting → CreateInspectionWithMultiVariants`, `AttemptCreateInspectionPosting → GetCreatedInspection`, `AttemptCreateInspectionReleased → CreateInspectionWithMultiVariants`, …)
- [Codeunit 20456 "Qlty. Batch Notif. Helper"](../codeunit/20456.md) (4 calls: `AttemptCreateInspectionReleased → BeginBatch`, `AttemptCreateInspectionReleased → ConfigureForBatch`, `AttemptCreateInspectionReleased → EndBatch`, …)
- [Codeunit 20408 "Qlty. Traversal"](../codeunit/20408.md) (3 calls: `UpdateSourceDocumentForSpecificInspectionOnLine → ApplySourceFields`, `UpdateSourceDocumentForSpecificInspectionOnOperation → ApplySourceFields`, `UpdateSourceDocumentForSpecificInspectionOnOrder → ApplySourceFields`)
- [Codeunit 99000837 "Prod. Order Line-Reserve"](../codeunit/99000837.md) (1 call: `AttemptCreateInspectionReleased → FindReservEntry`)

## Recent changes

- 2026-08-20 [#10270 [Quality Management] Repair and improve XML documentation of procedures](../../changes/bcapps/10270.md) (main, BC30, refactor)
- 2026-07-08 [#8556 [Quality Management] Enforce rules and restrictions with indirect and implicit permissions](../../changes/bcapps/8556.md) (main, BC30, feature)

## Across versions

- Present in: BC29-30
- Changed (declaration) in: none

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