---
id: object/codeunit/20409
type: object
title: Codeunit 20409 "Qlty. Result Condition Mgmt."
summary: Codeunit 20409 "Qlty. Result Condition Mgmt." in Quality Management (Microsoft.QualityManagement.Configuration.Result). 12 public procedures. Introduced in BC29, still in BC30, changed in BC30.
tier: official
language: en
tags:
  - codeunit
  - quality management
versions:
  introduced: "29"
  last_changed: "30"
  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: 79eeee912d4c794775852b17edb016520ed0c44921277e6f3cb012384a0b359b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Configuration/Result/QltyResultConditionMgmt.Codeunit.al
    title: src/Apps/W1/Quality Management/app/src/Configuration/Result/QltyResultConditionMgmt.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: 20409
name: Qlty. Result Condition Mgmt.
namespace: Microsoft.QualityManagement.Configuration.Result
app: Quality Management
extends: null
first_version: "29"
last_version: "30"
present_in:
  - "29"
  - "30"
changed_in:
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 19
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 11
  implements: 0
---

# Codeunit 20409 "Qlty. Result Condition Mgmt."

> Codeunit 20409 "Qlty. Result Condition Mgmt." in Quality Management (Microsoft.QualityManagement.Configuration.Result). 12 public procedures. Introduced in BC29, still in BC30, changed in BC30.

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

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "Qlty. Inspection Template Line" = r, tabledata "Qlty. Inspection Result" = r, tabledata "Qlty. Test" = r, tabledata "Qlty. I. Result Condit. Conf." = rim, tabledata "Qlty. Inspection Header" = r |

## Procedures

- `PromptUpdateTemplatesFromTestsIfApplicable(CopyFromQltyIResultConditConf: Record "Qlty. I. Result Condit. Conf.")` (internal): Prompts if templates should be updated.
- `PromptUpdateTestsFromResultIfApplicable(ResultCode: Code[20])` (internal): Prompts to overwrite existing test conditions after a result condition changes.
- `CopyResultConditionsFromTestToTemplateLine(Template: Code[20]; LineNo: Integer; OptionalSpecificResult: Code[20]; OverwriteConditionIfExisting: Boolean)` (internal): Used to copy result conditions from the default configuration to the template line.
- `CopyResultConditionsFromTemplateLineToTemplateLine(FromQltyInspectionTemplateLine: Record "Qlty. Inspection Template Line"; TargetQltyInspectionTemplateLine: Record "Qlty. Inspection Template Line")` (internal): Used for cloning templates.
- `CopyResultConditionsFromTemplateToInspection(QltyInspectionTemplateLine: Record "Qlty. Inspection Template Line"; QltyInspectionLine: Record "Qlty. Inspection Line")` (internal): Copy result conditions from a template to an inspection.
- `CopyGradeConditionsFromDefaultToAllTemplates()` (internal): This will copy any grade configurations configured to automatically copy to all existing templates. This leverages how CopyGradeConditionsFromFieldToTemplateLine will already update fields via CopyGradeConditionsFromDefaultToField when a specific grade is supplied.
- `CopyResultConditionsFromDefaultToTest(TestCode: Code[20])` (internal): Copies the default result conditions into the specified test.
- `CopyResultConditionsFromDefaultToTest(TestCode: Code[20]; SpecificQltyTestValueType: Enum "Qlty. Test Value Type")` (internal): Copies default result conditions to a test using a specified test value type.
- `GetPromotedResultsForTest(QltyTest: Record "Qlty. Test"; var MatrixSourceRecordId: array[10] of RecordId; var MatrixArrayToSetConditionCellData: array[10] of Text; var MatrixArrayToSetConditionDescriptionCellData: array[10] of Text; var MatrixArrayToSetCaptionSet: array[10] of Text; var MatrixVisibleStateToSet: array[10] of Boolean)` (internal): Returns the promoted results for a test
- `GetPromotedResultsForTemplateLine(QltyInspectionTemplateLine: Record "Qlty. Inspection Template Line"; var MatrixArraySourceRecordId: array[10] of RecordId; var MatrixArrayToSetConditionCellData: array[10] of Text; var MatrixArrayToSetConditionDescriptionCellData: array[10] of Text; var MatrixArrayToSetCaptionSet: array[10] of Text; var MatrixVisibleStateToSet: array[10] of Boolean)` (internal): Sets the promoted results for the template line. If the template line is being initialized then it will return the default promoted results with the default number condition for the results.
- `GetDefaultPromotedResults(AllPromoted: Boolean; var MatrixArraySourceRecordId: array[10] of RecordId; var MatrixArrayToSetConditionCellData: array[10] of Text; var MatrixArrayToSetConditionDescriptionCellData: array[10] of Text; var MatrixArrayToSetCaptionSet: array[10] of Text; var MatrixVisibleStateToSet: array[10] of Boolean)` (internal): Gets the default promoted results in general regardless of what is configured for a specific test or a given test on a template (specification) This can be used to help determine the overall promoted results in the system.
- `GetPromotedResultsForInspectionLine(QltyInspectionLine: Record "Qlty. Inspection Line"; var MatrixSourceRecordId: array[10] of RecordId; var MatrixArrayToSetConditionCellData: array[10] of Text; var MatrixArrayToSetConditionDescriptionCellData: array[10] of Text; var MatrixArrayToSetCaptionSet: array[10] of Text; var MatrixVisibleStateToSet: array[10] of Boolean)` (internal): Loads promoted result conditions for an inspection line, creating inspection conditions from its template when needed.

Plus 7 local procedures.

## 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 27 "Confirm Management"](../codeunit/27.md) (3 calls: `CopyGradeConditionsFromDefaultToAllTemplates → GetResponseOrDefault`, `PromptUpdateTemplatesFromTestsIfApplicable → GetResponseOrDefault`, `PromptUpdateTestsFromResultIfApplicable → GetResponseOrDefault`)

## Called by

- [Page 20479 "Qlty. Test Card"](../page/20479.md) (3 calls: `OnOpenPage → GetDefaultPromotedResults`, `UpdateRowData → GetDefaultPromotedResults`, `UpdateRowData → GetPromotedResultsForTest`)
- [Page 20401 "Qlty. Tests"](../page/20401.md) (2 calls: `OnOpenPage → GetDefaultPromotedResults`, `UpdateRowData → GetPromotedResultsForTest`)
- [Page 20403 "Qlty. Inspection Template Subf"](../page/20403.md) (2 calls: `OnOpenPage → GetDefaultPromotedResults`, `UpdateRowData → GetPromotedResultsForTemplateLine`)
- [Page 20407 "Qlty. Inspection Subform"](../page/20407.md) (2 calls: `OnOpenPage → GetDefaultPromotedResults`, `UpdateRowData → GetPromotedResultsForInspectionLine`)
- [Page 20445 "Qlty. Test Lookup"](../page/20445.md) (2 calls: `OnOpenPage → GetDefaultPromotedResults`, `UpdateRowData → GetPromotedResultsForTest`)
- [Table 20401 "Qlty. Test"](../table/20401.md) (2 calls: `HandleOnValidateTestValueType → CopyResultConditionsFromDefaultToTest`, `SetResultCondition → CopyResultConditionsFromDefaultToTest`)
- [Codeunit 20404 "Qlty. Inspection - Create"](../codeunit/20404.md) (1 call: `CreateQualityInspectionResultLinesFromTemplate → CopyResultConditionsFromTemplateToInspection`)
- [Codeunit 20440 "Qlty. Report Mgmt."](../codeunit/20440.md) (1 call: `ResolveLineResultAndMatrix → GetPromotedResultsForInspectionLine`)
- [Report 20402 "Qlty. Inspection Copy Template"](../report/20402.md) (1 call: `CopyTemplate → CopyResultConditionsFromTemplateLineToTemplateLine`)
- [Table 20403 "Qlty. Inspection Template Line"](../table/20403.md) (1 call: `EnsureResultsExist → CopyResultConditionsFromTestToTemplateLine`)
- [Table 20411 "Qlty. Inspection Result"](../table/20411.md) (1 call: `UpdateTestsTemplatesAndInspections → CopyGradeConditionsFromDefaultToAllTemplates`)

## 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: BC30

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