Get Vaues of base enums using code in X++

Hi,
How to get values of base enums using code in x++?

static void getEnumValues(Args _args)
{
EnumId enumId = enumNum(LedgerDimensionType);
DictEnum dictEnum = new DictEnum(enumId);
int count = dictEnum.values();
int counter

for(counter = 0; counter < count; counter ++)
{
// You can use the number of method exposed by DictEnum class
// dictEnum.name(counter)
// dictEnum.index2Value(counter)
// dictEnum.index2Symbol(counter)
// dictEnum.index2Label(counter)
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s