DictIndex.numberOfFields Method [AX 2012]
Returns the number of fields in the index definition.
The following example shows the retrieval of the number of fields in the index and lists the names of the fields in the index.
Dictionary dict;
DictTable table;
DictIndex idx;
DictField field;
int i;
dict = new Dictionary();
table = new DictTable(dict.tableName2Id("Address"));
idx = new DictIndex(table.id(), table.indexName2Id("AddrIdx"));
for (i=1; i <= idx.numberOfFields(); i++)
{
field = new DictField(table.id(), idx.field(i));
print field.name();
}
Community Additions
ADD
Show: