I have a map object where I store RecId as a key and a myTable.myField as a value. The type of the field is BasEnum. I’m trying to compare mapEnumerator.currentValue() to the myTable.myField and I get an error. I have a workaround, I’m using currentKey() to search for the record in the table and then I get the value but isn’t it possible to use the currentValue() while comparison?
mapEnumerator = map.getEnumerator();
while (mapEnumerator.moveNext())
{
if (myTable.enumField == mapEnumerator.currentValue())
{
info(“adsfsdafa”);
}
}
I also tried to use enum2str(), any2str(), any2enum() methods but couldn’t make it work. Any suggestions? It’s AX 2009.