internal final class CodingSpiderCodingExamples
{
public static void main(Args _args)
{
DictTable
dictTable = new SysDictTable(tableNum(VendTable));
FieldId fieldId
= dictTable.fieldNext(0);
DictField
dictField;
while(FieldId)
{
dictField =
dictTable.fieldObject(fieldId);
info(strFmt("%1-%2-%3-%4",
dictField.name(), dictField.mandatory(), dictField.baseType(),
dictField.label()));
fieldId =
dictTable.fieldNext(fieldId);
}
}
}
Output:
In the code snippet above, replace the table name with your required table name. After running the project the `info` statement displays field names, types, mandatory status, and labels in an info log message. You can modify this part of the code to suit your requirements, such as storing the Enum ID in a variable or using it for further processing.
Make sure to replace `TableName` with the appropriate name from your D365 FO environment.