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

How to disable auto enabled flight key using KillSwitch

Technical intro to Feature management in D365FO

Continuous integration and deployment Power platform FinOps tweaking