AppSourceCop Error AS0016
Fields of field class 'Normal' must use the DataClassification property and its value should be different from ToBeClassified
Description
Fields of field class 'Normal' must use the DataClassification property and its value must be different from ToBeClassified. FlowFields and FlowFilter fields are automatically set to the SystemMetadata data classification.
Remarks
For more information about data classification, see the documentation on the DataClassification property and on Classifying Data in Dynamics 365.
Note
Tables and fields marked as Obsolete Removed are and not deleted from the database. This is why they are also validated by this rule.
How to fix this diagnostic?
In order to fix the diagnostics reported you must set the DataClassification property on the table fields in your extension following the guidelines defined in Classifying Data in Dynamics 365.
Code examples triggering the rule
Example 1 - No data classification specified
table 50100 MyTable
{
fields
{
field(50100; MyField; Text[50]) { }
}
}
The following example triggers the rule because the field MyField
does not have any DataClassification specified.
Example 2 - Data classification has to be classified
table 50100 MyTable
{
fields
{
field(50100; MyField; Text[50])
{
DataClassification = ToBeClassified;
}
}
}
The following example triggers the rule because the data classification for field MyField
still has to be classified.
Code example not triggering the rule
table 50100 MyTable
{
fields
{
field(50100; MyField; Text[50])
{
DataClassification = CustomerContent;
}
}
}
The following example does not trigger the rule because the data classification for field MyField
still has a valid data classification specified.
Related information
AppSourceCop Analyzer
Get Started with AL
Developing Extensions