TreeNode.AOTadd Method [AX 2012]

Creates a subnode to the tree node in the Application Object Tree (AOT).

public TreeNode AOTadd(UtilElementName name)

Run On

Called

Parameters

name
Type: UtilElementName Extended Data Type
A string that indicates the name of the subnode to be created.

Return Value

Type: TreeNode Class
The newly created subnode.

The type of subnode that is created depends on where you are in the tree. The new node acquires the name that was passed through the parameter.

The following example adds a new form to the tree.

void addForm() 
{ 
    treeNode treeNode; 
    xInfo xInfo = new xInfo(); 
 
    treeNode = xInfo.rootNode(); 
    treeNode = treeNode.AOTfindChild("Forms"); 
    treeNode.AOTadd("myNewForm"); 
}

Community Additions

ADD
Show: