DictEnum.values Method [AX 2012]

Returns the number of items in the enumeration.

public int values()

Run On

Called

Return Value

Type: int
The number of items in the enumeration.

Because values must be unique, the number of values is the same as the number of items.

The following example shows how to retrieve the number of items in an enumeration and use that value in a loop.

DictEnum de; 
int      i; 
 
de = new DictEnum(enumName2Id("ActionType")); 
for (i=0; i < de.values(); i++) 
{ 
    print int2str(i) + ", " + de.index2Name(i); 
}

Community Additions

ADD
Show: