---
id: object/codeunit/20599
type: object
title: Codeunit 20599 "Qlty. Misc Helpers"
summary: Codeunit 20599 "Qlty. Misc Helpers" in Quality Management (Microsoft.QualityManagement.Utilities). 12 public procedures. 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: cfd9ec90944bf8e6c673c2d5ac839c50e240b8cadea9fd5035cfe514f72398b2
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Utilities/QltyMiscHelpers.Codeunit.al
    title: src/Apps/W1/Quality Management/app/src/Utilities/QltyMiscHelpers.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: 20599
name: Qlty. Misc Helpers
namespace: Microsoft.QualityManagement.Utilities
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: 14
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 4
  called_by: 9
  implements: 0
---

# Codeunit 20599 "Qlty. Misc Helpers"

> Codeunit 20599 "Qlty. Misc Helpers" in Quality Management (Microsoft.QualityManagement.Utilities). 12 public procedures. Introduced in BC29, still in BC30.

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

## Properties

| Property | Value |
|---|---|
| Permissions | tabledata "Qlty. Test Lookup Value" = r |

## Procedures

- `GetRecordsForTableFieldAsCSV(var QltyInspectionLine: Record "Qlty. Inspection Line"): Text` (internal): Retrieves available record values for a table lookup field configured on an inspection line, returned as CSV. Evaluates expressions and applies filters configured in the field definition to generate the list. Common usage: Populating dropdown lists or validating user input against configured lookup ...
- `GetRecordsForTableField(var QltyInspectionLine: Record "Qlty. Inspection Line"; var TempBufferQltyTestLookupValue: Record "Qlty. Test Lookup Value" temporary)` (internal): Retrieves available records for a table lookup field configured on an inspection line. Evaluates expressions and applies configured table filters to populate the lookup buffer. This overload automatically loads the inspection header and field definition from the inspection line, then calls the main ...
- `GetRecordsForTableField(var QltyTest: Record "Qlty. Test"; var OptionalContextQltyInspectionHeader: Record "Qlty. Inspection Header"; var TempBufferQltyTestLookupValue: Record "Qlty. Test Lookup Value" temporary)` (internal): Gets the available records for any given table field. This will evaluate expressions!
- `GetRecordsForTableField(var QltyTest: Record "Qlty. Test"; var OptionalContextQltyInspectionHeader: Record "Qlty. Inspection Header"; var OptionalContextQltyInspectionLine: Record "Qlty. Inspection Line"; var TempBufferQltyTestLookupValue: Record "Qlty. Test Lookup Value" temporary)`: Retrieves lookup values for a quality field with context-sensitive filtering. Evaluates dynamic table filters using Inspection context and populates temporary buffer with available choices. Behavior: - Evaluates QltyTest."Lookup Table Filter" using inspection header/line context for dynamic filterin...
- `GetCSVOfValuesFromRecord(CurrentTable: Integer; ChoiceField: Integer; TableFilter: Text; MaxCountRecords: Integer): Text` (internal): Generates a CSV string of values for a specific field from a table with optional filtering. Retrieves up to MaxCountRecords records and formats field values as comma-separated text. Example: For Item table, Location Code field → "BLUE,RED,GREEN,YELLOW" Common usage: Building dropdown lists, generati...
- `GetCSVOfValuesFromRecord(CurrentTable: Integer; ChoiceField: Integer; TableFilter: Text): Text` (internal): Generates a CSV string of values for a specific field from a table with optional filtering. Uses system-defined maximum recursion limit for record count. This internal overload is optimized for configuration traversal scenarios where a reasonable default limit is appropriate.
- `IsNumericText(Input: Text): Boolean` (internal): Determines whether text can be evaluated as a decimal value.
- `GuessDataTypeFromDescriptionAndValue(Description: Text; OptionalValue: Text): Enum "Qlty. Test Value Type"` (internal): Attempts to infer the appropriate data type for a quality field based on its description text and sample value. Uses heuristic analysis of keywords and value patterns to suggest the most suitable field type. Detection priority: 1. Value-based detection (if OptionalValue provided): - Boolean-like tex...
- `SetTableValue(TableName: Text; TableFilter: Text; NumberOrNameOfFieldToSet: Text; ValueToSet: Text; Validate: Boolean)` (internal): Sets a field value in any table record identified by name/ID with optional validation. Provides flexible table and field identification using names, captions, or numeric IDs. Resolution order: - TableName: Checked as object name → object caption → integer ID - NumberOrNameOfFieldToSet: Checked as fi...
- `ReadFieldAsText(CurrentRecordVariant: Variant; NumberOrNameOfFieldName: Text; FormatNumber: Integer): Text` (internal): Reads a field value from any record variant and returns it as formatted text. Provides flexible field identification and configurable formatting options. Field identification: - NumberOrNameOfFieldName: Field name or numeric ID as text Formatting behavior: - FormatNumber parameter controls output fo...
- `GetUserNameByUserSecurityID(UserSecurityID: Guid): Code[50]` (internal): Gets a user name from a user security identifier when user data is readable.
- `GetRecordRefFromVariant(CurrentVariant: Variant; var RecordRef: RecordRef): Boolean` (internal): Extracts a valid record reference from a variant.

Plus 2 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 20403 "Qlty. Filter Helpers"](../codeunit/20403.md) (3 calls: `ReadFieldAsText → IdentifyFieldIDFromText`, `SetTableValue → IdentifyFieldIDFromText`, `SetTableValue → IdentifyTableIDFromText`)
- [Codeunit 20436 "Qlty. Boolean Parsing"](../codeunit/20436.md) (1 call: `GuessDataTypeFromDescriptionAndValue → CanTextBeInterpretedAsBooleanIsh`)
- [Codeunit 701 "Data Type Management"](../codeunit/701.md) (1 call: `GetRecordRefFromVariant → GetRecordRef`)
- [Codeunit 8617 "Config. Validate Management"](../codeunit/8617.md) (1 call: `SetTableValue → EvaluateTextToFieldRef`)

## Called by

- [Codeunit 20408 "Qlty. Traversal"](../codeunit/20408.md) (6 calls: `FindRelatedBillOfMaterialIn → GetRecordRefFromVariant`, `FindRelatedCustomerIn → GetRecordRefFromVariant`, `FindRelatedItemIn → GetRecordRefFromVariant`, …)
- [Codeunit 20404 "Qlty. Inspection - Create"](../codeunit/20404.md) (3 calls: `FindExistingInspectionWithMultipleVariants → GetRecordRefFromVariant`, `InternalCreateInspectionWithGenerationRule → GetRecordRefFromVariant`, `InternalCreateInspectionWithVariantAndTemplate → GetRecordRefFromVariant`)
- [Codeunit 20416 "Qlty. Expression Mgmt."](../codeunit/20416.md) (3 calls: `EvaluateBuiltInTableLookups → ReadFieldAsText`, `EvaluateExpressionForRecord → GetRecordRefFromVariant`, `LookupFieldValueBasedOn → ReadFieldAsText`)
- [Table 20405 "Qlty. Inspection Header"](../table/20405.md) (2 calls: `GetRelatedItem → GetRecordRefFromVariant`, `SetRecordFiltersToFindInspectionFor → GetRecordRefFromVariant`)
- [Codeunit 20424 "Qlty. Workflow Response"](../codeunit/20424.md) (1 call: `HandleOnExecuteWorkflowResponse → SetTableValue`)
- [Codeunit 20437 "Qlty. Notification Mgmt."](../codeunit/20437.md) (1 call: `NotifyDocumentCreated → GetRecordRefFromVariant`)
- [Codeunit 20438 "Qlty. Warehouse Integration"](../codeunit/20438.md) (1 call: `CollectSourceItemTracking → GetRecordRefFromVariant`)
- [Codeunit 20440 "Qlty. Report Mgmt."](../codeunit/20440.md) (1 call: `ResolveModifiedByUser → GetUserNameByUserSecurityID`)
- [Table 20401 "Qlty. Test"](../table/20401.md) (1 call: `UpdateAllowedValuesFromTableLookup → GetCSVOfValuesFromRecord`)

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