Friday 6 July 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:

Adding a newline into a string in C# and X++

Below is the sample code we can use for  adding a newline after every occurrence of "@" symbol in the string in C#   using System...