#AOT Is Defined in The AOT Under Macros. #Aot: //replace With '/classes' For Class and '/forms' For Form
#AOT Is Defined in The AOT Under Macros. #Aot: //replace With '/classes' For Class and '/forms' For Form
{
TreeNode treeNode;
FileIoPermission perm;
str treeNodeName;
str path;
// #AOT is defined in the AOT under Macros.
#AOT
;
//Replace with '\Classes' for class and '\Forms' for form
treeNode = TreeNode::findNode(@'\Data Dictionary\Tables';);
treeNode = treeNode.AOTfirstChild();
while(treeNode)
{
treeNodeName = treeNode.treeNodeName();
path = @'C:\AOT\' + treeNodeName + '.xpo';
perm = new FileIoPermission(path, 'w');
if (perm == null)
{
throw error('Unable to create file for ' + treeNodeName);
}
perm.assert();
treeNode.treeNodeExport(path);
CodeAccessPermission::revertAssert();
treeNode = treeNode.AOTnextSibling();
}
}
// Uses the full path to obtain the node for the new enum element
// that this job creates near its completion.
tnode2Enum = TreeNode::findNode(#BaseEnumsPath);
static void Job_ExportAOTObject(Args _args)
{
TreeNode treeNode;
FileIoPermission perm;
str treeNodeName;
str path;
EnumId enumId;
DictEnum dictEnum;
int count;
int counter;
;
//Replace with '\Classes' for class and '\Forms' for form
treeNode = TreeNode::findNode(#BaseEnumsPath);
treeNode = treeNode.AOTfirstChild();
while(treeNode)
{
treeNodeName = treeNode.treeNodeName();
enumId = enumNum(treeNodeName);
dictEnum = new DictEnum(enumId);
count = dictEnum.values();
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)
}
treeNode = treeNode.AOTnextSibling();
count =0;
}
}
http://swapnakallu.blogspot.in/2012/11/dictenum-class-in-ax2012.html
https://msdn.microsoft.com/en-us/library/cc967395.aspx
http://axaptacorner.blogspot.in/2012/03/create-enum-dynamicaly-by-code.html
http://www.agermark.com/2008/01/get-literal-label-of-enum-value.html
http://www.schweda.net/blog_ax.php?bid=478&wdl=en
http://arsalanax.blogspot.in/2012/02/get-values-of-base-enums-using-code-in.html
http://mcr-tinavdvyver.rhcloud.com/list-of-table-fields-and-types-in-csv-file/
http://mcr-tinavdvyver.rhcloud.com/cross-reference-of-sorts-for-base-enums/
http://www.johanmulder.com/?p=19
//Traverse tables and for each table traverse fields using AOT
http://blog.soenderhousen.dk/2012/09/28/85