#208 2 AL/BC patterns: TableRelation field length and RecordRef.Open Temp parameter
Two new knowledge articles identify silent runtime mismatches in table relations and record reference calls that compile without diagnostic warnings. The articles explain the exact rules for field length matching and the pitfalls of using RecordRef.Open with the temporary parameter flag.
- 9files
- 8AL files
- 0objects
Pull request · merged into main on 2026-10-06 by MichaelDieringer · 9 files (+267 -6), 8 AL · feature · tier official · reviewed (checked by Opus)
What changed
- Table relation fields shorter than their target compile cleanly but fail at runtime when longer values are assigned
- Mixed Code/Text targets require Text type and minimum length rules vary by relation type
- RecordRef.Open with Temp=true creates empty instances that bypass existence and uniqueness checks
- Legitimate temporary uses include validation sandboxes and filter parsing
- Knowledge base extended with guidance to help developers avoid these common mistakes
AL objects touched
microsoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/tablerelation-field-length-must-match-related-field.md: added, not in the BC? snapshot yetmicrosoft/knowledge/testing/recordref-open-temp-parameter-defeats-real-table-checks.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/testing/recordref-open-temp-parameter-defeats-real-table-checks.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/testing/recordref-open-temp-parameter-defeats-real-table-checks.md: added, not in the BC? snapshot yetmicrosoft/skills/review/al-data-modeling-review.md: modified, not in the BC? snapshotmicrosoft/skills/review/al-testing-review.md: modified, not in the BC? snapshot
Context
- Systems: development, platform
Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).