MapEnumerator.currentValue Method [AX 2012]
Returns the value from the (key, value) pair that is currently pointed to by the enumerator.
The following example searches through a map to find an element that has a value equal to that passed in as a parameter. The MapEnumerator.moveNext method is used to iterate through the map, and the currentValue method is used to test each value to see whether it matches the parameter.
private LabelType tableLabel(tableId _tableId)
{
LabelType labelType;
MapEnumerator mapEnum;
mapEnum = tableAllMap.getEnumerator();
while (mapEnum.moveNext())
{
if (_tableId == mapEnum.currentValue())
{
labelType = mapEnum.currentKey();
break;
}
}
return labelType;
}
Community Additions
ADD
Show: