DictField.enumId Method [AX 2012]
Returns the ID of the enumeration if the field is based on an enumeration.
public EnumId enumId()
Run On
CalledReturn Value
Type: EnumId Extended Data TypeThe enumeration ID if the field is based on an enumeration; otherwise, 0 (zero).
The following example shows the retrieval of the enumeration ID and the enumeration name of a field that is based on an enumeration.
DictField df;
DictEnum de;
enumId id;
df = new DictField(tablenum(CustTable), fieldnum(CustTable, AccountNum));
if (df)
{
id = df.enumId();
if (0 != id)
{
de = new DictEnum(id);
if (de)
{
print de.name();
}
}
}
Community Additions
ADD
Show: