From 89411ef60a108a5ef0af37db474a4df45971c708 Mon Sep 17 00:00:00 2001 From: Michael Dieringer <65093775+MichaelDieringer@users.noreply.github.com> Date: Thu, 1 Oct 2026 23:35:21 +0200 Subject: [PATCH] Drop unverified claim about where-filtered relations The Table Relations Metadata mapping of where(...) filters to Condition Field No. is not documented and could not be verified; the rule does not depend on it. Co-Authored-By: Claude Opus 5.5 --- .../tablerelation-field-length-must-match-related-field.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/microsoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.md b/microsoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.md index 243191f..654c052 100644 --- a/microsoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.md +++ b/microsoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.md @@ -20,7 +20,7 @@ The length Business Central's own relation check expects depends on whether the - **At least one unconditional relation**, either a plain `TableRelation = X` or an unconditional branch: the field must have the **exact** length of the longest related field and the same type. - **Only conditional relations** (`if (...) X else if (...) Y`): the field must be **at least** as long as the longest related field. A longer field is accepted. -A `where(...)` filter on a relation doesn't make it conditional. For the type, the check requires the related field's type, or `Text` when the related fields mix `Code` and `Text`. Only under all-conditional relations, and only when the required type is `Code`, may the field be `Text` instead. +For the type, the check requires the related field's type, or `Text` when the related fields mix `Code` and `Text`. Only under all-conditional relations, and only when the required type is `Code`, may the field be `Text` instead. The check skips any field that sets `ValidateTableRelation = false` or `TestTableRelation = false`. The Base Application sets `ValidateTableRelation = false` on filter and totaling fields, which hold a filter expression rather than one key value. Such a field may be longer than the related field. A field that is shorter than the related field is still a defect even with either property set to `false`, because a real related value still overflows it at runtime.