DataClassification redundancy (LC0019)
The DataClassification property set on a table automatically applies to all its fields. When individual fields repeat the same value that is already defined at the table level, the declaration is redundant.
Redundant property declarations clutter the code with repeated lines that carry no additional meaning. They also increase the maintenance burden: if the table-level classification changes, every field that duplicates the old value must be updated individually. Over time this creates a risk that field-level values drift out of sync with the intended table-level default.
A code fix is available for this diagnostic.
Example
The following field redundantly specifies the same DataClassification as the table:
table 50100 MyTable
{
DataClassification = CustomerContent;
fields
{
field(1; MyField; Integer)
{
DataClassification = CustomerContent;
}
}
}To fix this, remove the redundant property from the field:
table 50100 MyTable
{
DataClassification = CustomerContent;
fields
{
field(1; MyField; Integer)
{
}
}
}