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:

Why do users often get confused about Dynamics 365 Customer Engagement (D365 CE), Dataverse, and the Power Platform?

  The Microsoft ecosystem for business applications can sometimes be difficult to navigate, especially when discussing Dynamics 365 Customer...