Adding new values to Enum through coding

Hello friends,

I am new to AX. Anybody please tell me "how to add new elements dynamically to base enum " through coding in ax 5.0.

The find out a solution i googled as “adding new elements to combo box”.Still i didn’t find a solution. please help me to resolve this.

Thanks in advance

Vinay.P

A simple example here

static void addEnumvalue(Args _args)
{
#AOT
TreeNode treeNodeEnum;
;

treeNodeEnum = TreeNode::findNode(#BaseEnumsPath);
treeNodeEnum = treeNodeEnum.AOTfindChild(‘ABCModel’);

treeNodeEnum.AOTadd(‘Test’);

treeNodeEnum.AOTsave();
}

If you need a dynamic set of values, enum is not a good choice. If you explained what you want to achieve, somebody could show you a better approach.