Friday, July 6, 2018

How to get label from Enum Value in AX x++

Hi,
Below is the code we can use for getting the label for an enum.In this example I'm taking InventTransType enum.

    SysDictEnum dictEnum = new SysDictEnum( enumnum(InventTransType) ); 

   dictEnum.value2Label(InventTrans.TransType);

       or 
 // If you want to assign the label to string
   dictEnum.index2Name(InventTrans.TransType);

1 comment:

What is the primary purpose of using a Solution in Microsoft Power Platform & ALM?

As organizations embrace low-code development with Microsoft Power Platform , it becomes essential to manage and govern apps, flows, and dat...