Search code examples
enumsaxapta

How to get base enum name in Dynamics AX?


I would like get in code name of base enum not value or label. With this code I get label not name:

info(enum2str(AssetGroup::AssetGroup1));

Solution

  • Simply use enum2Symbol()

    For example:

    enum2Symbol(enumNum(KPAssetGroup), KPAssetGroup::PWNiP);