---
id: object/table/20402
type: object
title: Table 20402 "Qlty. Inspection Template Hdr."
summary: Table 20402 "Qlty. Inspection Template Hdr." in Quality Management (Microsoft.QualityManagement.Configuration.Template). 6 fields, 2 public procedures. Introduced in BC29, still in BC30.
tier: official
language: en
tags:
  - table
  - 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: df5f2e21918eb0f4e92245eda9fa7185d4e81f63c9caa11a0e7410c84f359898
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Configuration/Template/QltyInspectionTemplateHdr.Table.al
    title: src/Apps/W1/Quality Management/app/src/Configuration/Template/QltyInspectionTemplateHdr.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/qms-overview
    - https://learn.microsoft.com/dynamics365/business-central/qms-production-output-testing
    - https://learn.microsoft.com/dynamics365/business-central/qms-purchase-receipt-testing-simple
    - https://learn.microsoft.com/dynamics365/business-central/qms-purchase-receipt-testing-warehouse
    - https://learn.microsoft.com/dynamics365/business-central/qms-quality-templates
    - https://learn.microsoft.com/dynamics365/business-central/qms-scheduled-test-creation
    - https://learn.microsoft.com/dynamics365/business-central/qms-setup
    - https://learn.microsoft.com/dynamics365/business-central/qms-test-generation-rules
    - https://learn.microsoft.com/dynamics365/business-central/qms-troubleshooting
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/quality-management
    - topic/business-central/business-functionality/quality-management/set-up-quality-management
    - topic/business-central/business-functionality/set-up-business-central/set-up-quality-management
    - topic/business-central/get-started/learn/contoso-coffee-demo-data/quality-management
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/10270
    - change/bcapps/8556
object_type: table
object_id: 20402
name: Qlty. Inspection Template Hdr.
caption: Quality Inspection Template Header
namespace: Microsoft.QualityManagement.Configuration.Template
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: 6
  procedures: 2
  events: 0
  subscribers: 0
relations:
  out: 2
  referenced_by: 5
  pages: 2
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 20402 "Qlty. Inspection Template Hdr."

> Table 20402 "Qlty. Inspection Template Hdr." in Quality Management (Microsoft.QualityManagement.Configuration.Template). 6 fields, 2 public procedures. Introduced in BC29, still in BC30.

Quality Management · Microsoft.QualityManagement.Configuration.Template · captioned "Quality Inspection Template Header" · BC29-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Apps/W1/Quality%20Management/app/src/Configuration/Template/QltyInspectionTemplateHdr.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 20402 "Qlty. Inspection Template"](../page/20402.md) (9 Learn pages), [Page 20404 "Qlty. Inspection Template List"](../page/20404.md) (9).

## Properties

| Property | Value |
|---|---|
| Caption | Quality Inspection Template Header |
| DataClassification | CustomerContent |
| LookupPageId | Qlty. Inspection Template List |
| DrillDownPageId | Qlty. Inspection Template List |
| Permissions | tabledata "Qlty. Inspection Template Line" = d, tabledata "Qlty. Inspection Gen. Rule" = d, tabledata "Qlty. Inspection Line" = m |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Code | Code[20] | Specifies the code to identify the Quality Inspection Template set. | NotBlank |
| 2 | Description | Text[100] | Specifies an explanation of the Quality Inspection Template. You can enter a maximum of 100 characters, both numbers and letters. |  |
| 7 | Copied From Template Code | Code[20] | Specifies where a template was copied from. |  |
| 17 | Sample Source | Enum "Qlty. Sample Size Source" | Specifies how the Sample Size initially gets set. Values are rounded up to the nearest whole number. | enum [Enum 20463 "Qlty. Sample Size Source"](../enum/20463.md) |
| 18 | Sample Fixed Amount | Integer | Specifies the discrete fixed sample amount when Sample Source is set to a fixed quantity. Samples can only be discrete units. If the quantity here exceeds the Source Quantity then the Source Quantity will be used instead. |  |
| 19 | Sample Percentage | Decimal | Specifies a percentage of the source quantity that will default the sample size. Samples can only be discrete units. Values will be rounded to the highest discrete amount. |  |

## Keys

- Key1: Code (clustered)

## Procedures

- `AddTestToTemplate(TestCode: Code[20]): Boolean` (obsolete 29.0: Replaced by SelectMultipleTests() / AddSelectedTests() on "Qlty. Inspection Template Line".): Adds the supplied test to the template if it does not already exist. If it already exists then it will not add the test.
- `AddTestToTemplate(TestCode: Code[20]; var QltyInspectionTemplateLine: Record "Qlty. Inspection Template Line"): Boolean` (obsolete 29.0: Replaced by SelectMultipleTests() / AddSelectedTests() on "Qlty. Inspection Template Line".): Adds the supplied test to the template if it does not already exist. If it already exists then it will not add the test and it will simply find it.

## Triggers

OnDelete, OnRename

## Relations

- drill-down page [Page 20404 "Qlty. Inspection Template List"](../page/20404.md)
- lookup page [Page 20404 "Qlty. Inspection Template List"](../page/20404.md)

## Referenced by

5 fields in 5 objects relate to this table (TableRelation or CalcFormula).

- [Table 20400 "Qlty. Management Setup"](../table/20400.md): Scheduler Template Code
- [Table 20403 "Qlty. Inspection Template Line"](../table/20403.md): Template Code
- [Table 20404 "Qlty. Inspection Gen. Rule"](../table/20404.md): Template Code
- [Table 20405 "Qlty. Inspection Header"](../table/20405.md): Template Code
- [Table 20412 "Qlty. I. Result Condit. Conf."](../table/20412.md): Target Code

## Pages and codeunits on this table

- [Page 20402 "Qlty. Inspection Template"](../page/20402.md) (source table)
- [Page 20404 "Qlty. Inspection Template List"](../page/20404.md) (source table)

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

## Deprecations

- procedure AddTestToTemplate: Pending 29.0 (#if not CLEAN29), "Replaced by SelectMultipleTests() / AddSelectedTests() on "Qlty. Inspection Template Line"."
- procedure AddTestToTemplate: Pending 29.0 (#if not CLEAN29), "Replaced by SelectMultipleTests() / AddSelectedTests() on "Qlty. Inspection Template Line"."

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). 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: "table", object_name: "Qlty. Inspection Template Hdr.")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
