Sunday, July 20, 2014

get values of base enums using code in x++

Question: How to get  values of base enums using code in x++

static void getEnumValues(Args _args)

{

    EnumId   enumId   = enumNum(LedgerDimensionType);

    DictEnum dictEnum = new DictEnum(enumId);

    int      count  = dictEnum.values();

    int      counter 


 

    for(counter = 0; counter < count; counter ++)

    {

        // You can use the number of method exposed by DictEnum class

// dictEnum.name(counter)

// dictEnum.index2Value(counter)

// dictEnum.index2Symbol(counter)             

// dictEnum.index2Label(counter)

    }

}

How to identify the user that was used to change an object from AOT in AX2012

Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...