bcquality/microsoft/knowledge/data-modeling/validate-table-relation-false-suppresses-rename-propagation.bad.al
Jesper Schulz-Wedde 42ff075793 Promote knowledge for Microsoft review skills
Move canonical knowledge for Microsoft-owned review domains into the Microsoft layer and document the skill/knowledge co-location policy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 2a6ea875-d38e-4f30-aadb-0d606f9be231
2026-09-03 14:59:44 +02:00

35 lines
1.1 KiB
AL

table 50121 "Document Link"
{
fields
{
field(1; "Entry No."; Integer)
{
DataClassification = CustomerContent;
}
field(2; "Document No."; Code[20])
{
DataClassification = CustomerContent;
TableRelation = "Source Document"."No.";
// Added to silence a validation error while the row is staged, before
// the Source Document exists. The relation is still declared, so this
// reads as harmless — but it also switches OFF rename propagation.
// Renaming a Source Document now leaves this field on the old key,
// with no error, and nothing else maintains it.
ValidateTableRelation = false;
}
// Composite value: no TableRelation is possible, and no OnRename on the
// owning table maintains it either. Rots the same way, for the other reason.
field(3; "Source Key"; Code[50])
{
DataClassification = CustomerContent;
}
}
keys
{
key(PK; "Entry No.")
{
Clustered = true;
}
}
}