Iterate enum values in D365 without BP errors

This is how to iterate enumeration values in D365FO without getting BP errors shown on the TableGroupAll enumeration.

DictEnum enum = new DictEnum(enumNum(TableGroupAll));

if(enum != null)
{
 for (int i = 0; i < enum.values(); i++)
 {
  TableGroupAll tableGroupAllEnumVal = any2Enum(enum.index2Value(i));
 }
}

Comments

Popular posts from this blog

D365FO Data management change tracking enable/disable not working

Displaying a value from a array field in EP

Table array field iteration