This post is machine-translated. The original post in german language can be found here.
These post applies to following versions:
Dynamics AX 2012, Dynamics AX 2009, Dynamics AX 4.0, Axapta 3.0, Axapta 2.5
Dynamics AX 2012, Dynamics AX 2009, Dynamics AX 4.0, Axapta 3.0, Axapta 2.5
|
|
|
|
|
|
Find below a short example, how to add object nodes to a shared project through code.
{
projectNode projectNode;
TreeNode treeNode;
#AOT
#AOTExport
projectNode = infolog.projectRootNode();
projectNode = projectNode.AOTfindChild(#expProjectShared);
projectNode = projectNode.AOTfindChild('MyProject');
// Add objects
treenode = TreeNode::findNode(#TablesPath+'\\'+tableid2name(tablenum(CustGroup)));
projectNode.addNode(treenode);
treenode = TreeNode::findNode(#TablesPath+'\\'+tableid2name(tablenum(VendGroup)));
projectNode.addNode(treenode);
treenode = TreeNode::findNode(#ClassesPath+'\\'+classStr(PriceDisc));
projectNode.addNode(treenode);
}
The so modified Project will look like this: