TreeNode.AOTaddSubNode Method [AX 2012]

Creates subnodes for extended data types and relations.

public TreeNode AOTaddSubNode(int nodetype)

Run On

Called

Parameters

nodetype
Type: int
The type of node to be created. The TreeNodeSysNodeType macro contains the legal arguments for this method.
The valid arguments for creating extended data types are:

Return Value

Type: TreeNode Class
The new TreeNode object.

This method throws an exception if the specified node type is not allowed to be added to the tree node.

The following example creates a new extended data type of the enum type in the AOT.

{ 
TreeNode t1,t2; 
str s; 
#TreeNodeSysNodeType 
#AOT 
 
t1 = TreeNode::findNode(#ExtendedDataTypesPath); 
t2 = t1.AOTaddSubNode(#NT_DBENUMTYPETYPE); 
s = t2.AOTname(); 
print "A new EDT called " + s + " has been added to the AOT"; 
pause; 
}

Community Additions

ADD
Show: