---
id: object/codeunit/20410
type: object
title: Codeunit 20410 "Qlty. Result Evaluation"
summary: Codeunit 20410 "Qlty. Result Evaluation" in Quality Management (Microsoft.QualityManagement.Configuration.Result). 18 public procedures, 4 events. 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: e15263eb35b1ac25239fbf4223b95c9869b538474d3790d4a58a42e163cb95d0
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Configuration/Result/QltyResultEvaluation.Codeunit.al
    title: src/Apps/W1/Quality Management/app/src/Configuration/Result/QltyResultEvaluation.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: 20410
name: Qlty. Result Evaluation
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: 33
  events: 4
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 3
  called_by: 3
  implements: 0
---

# Codeunit 20410 "Qlty. Result Evaluation"

> Codeunit 20410 "Qlty. Result Evaluation" in Quality Management (Microsoft.QualityManagement.Configuration.Result). 18 public procedures, 4 events. 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/QltyResultEvaluation.Codeunit.al) · facts from BC29

## Properties

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

## Events published

- `OnBeforeEvaluateResult(var QltyIResultConditConf: Record "Qlty. I. Result Condit. Conf."; var QltyTestValueType: Enum "Qlty. Test Value Type"; var TestValue: Text; var Result: Code[20]; var IsHandled: Boolean)` (integration): OnBeforeEvaluateResult gives an opportunity to change how a result is evaluated.
- `OnAfterEvaluateResult(var QltyIResultConditConf: Record "Qlty. I. Result Condit. Conf."; var QltyTestValueType: Enum "Qlty. Test Value Type"; var TestValue: Text; var Result: Code[20]; var TempHighestQltyIResultConditConf: Record "Qlty. I. Result Condit. Conf." temporary)` (integration): OnAfterEvaluateResult gives an opportunity to run additional logic after a result has been determined by the system.
- `OnBeforeValidateAllowableValuesOnText(var TestNameForError: Text; var TextToValidate: Text[250]; var AllowableValues: Text; var QltyTestValueType: Enum "Qlty. Test Value Type"; var TempBufferQltyTestLookupValue: Record "Qlty. Test Lookup Value" temporary; var QltyCaseSensitivity: Enum "Qlty. Case Sensitivity"; var IsHandled: Boolean)` (integration): Allows you to alter the behavior of validating allowable values on text.
- `OnAfterValidateAllowableValuesOnText(var TestNameForError: Text; var TextToValidate: Text[250]; var AllowableValues: Text; var QltyTestValueType: Enum "Qlty. Test Value Type"; var TempBufferQltyTestLookupValue: Record "Qlty. Test Lookup Value" temporary; var QltyCaseSensitivity: Enum "Qlty. Case Sensitivity")` (integration): Provides the opportunity to extend and add additional validation after the allowable values has occurred.

## Procedures

- `EvaluateResult(var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header"; var QltyIResultConditConf: Record "Qlty. I. Result Condit. Conf."; QltyTestValueType: Enum "Qlty. Test Value Type"; TestValue: Text; QltyCaseSensitivity: Enum "Qlty. Case Sensitivity"): Code[20]` (internal): Evaluates a result with an optional test. The test is used to help with expression evaluation.
- `EvaluateResult(var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header"; var OptionalQltyInspectionLine: Record "Qlty. Inspection Line"; var QltyIResultConditConf: Record "Qlty. I. Result Condit. Conf."; QltyTestValueType: Enum "Qlty. Test Value Type"; TestValue: Text; QltyCaseSensitivity: Enum "Qlty. Case Sensitivity"): Code[20]` (internal): Evaluates a result with an optional test and inspection line. The test is used to help with expression evaluation.
- `ValidateQltyInspectionLine(var QltyInspectionLine: Record "Qlty. Inspection Line")` (internal): Call this procedure to validate the inspection line.
- `TryValidateQltyInspectionLine(var QltyInspectionLine: Record "Qlty. Inspection Line"; var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header")` (internal): This will *not* modify the inspection line. This will only try and validate the inspection line itself.
- `ValidateQltyInspectionLine(var QltyInspectionLine: Record "Qlty. Inspection Line"; var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header"; Modify: Boolean)`: Call this procedure to validate the inspection line for the given test.
- `ValidateInspectionLineWithAllowableValues(var QltyInspectionLine: Record "Qlty. Inspection Line"; var OptionalQltyInspectionHeader: Record "Qlty. Inspection Header"; CheckForAllowableValues: Boolean; UpdateHeader: Boolean)` (internal): Validates optional allowable values, evaluates the line result, sets its failure state, and optionally persists line and header updates.
- `GetInspectionLineConfigFilters(var QltyInspectionLine: Record "Qlty. Inspection Line"; var TemplateLineQltyIResultConditConf: Record "Qlty. I. Result Condit. Conf.")` (internal): Filters result conditions to the specified inspection line and test.
- `ValidateAllowableValuesOnTest(var QltyTest: Record "Qlty. Test")` (internal): Validates and normalizes a test default value against its allowable values without inspection context.
- `ValidateAllowableValuesOnTest(var QltyTest: Record "Qlty. Test"; var OptionalContextQltyInspectionHeader: Record "Qlty. Inspection Header")` (internal): Validates and normalizes a test default value with optional inspection header context.
- `ValidateAllowableValuesOnTest(var QltyTest: Record "Qlty. Test"; var OptionalContextQltyInspectionHeader: Record "Qlty. Inspection Header"; var OptionalContextQltyInspectionLine: Record "Qlty. Inspection Line")` (internal): Validates and normalizes a test default value with optional inspection header and line context.
- `ValidateAllowableValuesFormat(var QltyTest: Record "Qlty. Test")` (internal): Validates that the allowable values expression is a valid filter for the given test value type.
- `CheckIfValueIsDecimal(ValueToCheck: Text; AcceptableValue: Text): Boolean` (internal): Checks whether a decimal text value satisfies an acceptable-value filter.
- `CheckIfValueIsInteger(ValueToCheck: Text; AcceptableValue: Text): Boolean` (internal): Checks whether an integer text value satisfies an acceptable-value filter.
- `CheckIfValueIsDateTime(var ValueToCheck: Text[250]; AcceptableValue: Text; AdjustValueIfGood: Boolean): Boolean` (internal): Checks a date-time text value against a filter and optionally normalizes valid text.
- `CheckIfValueIsDate(var ValueToCheck: Text[250]; AcceptableValue: Text; AdjustValueIfGood: Boolean): Boolean` (internal): Checks a date text value against a filter and optionally normalizes valid text.
- `CheckIfValueIsString(ValueToCheck: Text; AcceptableValue: Text): Boolean` (internal): Checks a string against a case-sensitive acceptable-value filter.
- `CheckIfValueIsString(ValueToCheck: Text; AcceptableValue: Text; QltyCaseSensitivity: Enum "Qlty. Case Sensitivity"): Boolean` (internal): Checks a string against an acceptable-value filter with specified case sensitivity.
- `CheckIfValueIsInPredefinedList(ValueToCheck: Text; AcceptableValue: Text; QltyCaseSensitivity: Enum "Qlty. Case Sensitivity"): Boolean` (internal): Checks whether a value equals a literal entry in a comma- or pipe-separated list.

Plus 11 local procedures.

## Triggers

OnRun

## Relations

- runs on [Table 20406 "Qlty. Inspection Line"](../table/20406.md)

## 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 20436 "Qlty. Boolean Parsing"](../codeunit/20436.md) (3 calls: `TryApplyBooleanFilter → CanTextBeInterpretedAsBooleanIsh`, `ValidateAllowableValuesOnText → CanTextBeInterpretedAsBooleanIsh`, `ValidateAllowableValuesOnText → GetBooleanFor`)
- [Codeunit 20431 "Qlty. Localization"](../codeunit/20431.md) (2 calls: `ValidateAllowableValuesOnText → GetTranslatedNo`, `ValidateAllowableValuesOnText → GetTranslatedYes`)
- [Codeunit 20416 "Qlty. Expression Mgmt."](../codeunit/20416.md) (1 call: `ValidateAllowableValuesOnInspectionLine → EvaluateTextExpression`)

## Called by

- [Table 20401 "Qlty. Test"](../table/20401.md) (2 calls: `ValidateAllowableValuesFormat → ValidateAllowableValuesFormat`, `ValidateAllowableValuesOnDefault → ValidateAllowableValuesOnTest`)
- [Table 20406 "Qlty. Inspection Line"](../table/20406.md) (2 calls: `UpdateExpressionsInOtherInspectionLinesInSameInspection → GetInspectionLineConfigFilters`, `ValidateTestValue → ValidateQltyInspectionLine`)
- [Codeunit 20404 "Qlty. Inspection - Create"](../codeunit/20404.md) (1 call: `CreateQualityInspectionResultLinesFromTemplate → TryValidateQltyInspectionLine`)

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