Axapta: Is it possible to move AOT nodes programatically?

Posted by axapter on Stack Overflow See other posts from Stack Overflow or by axapter
Published on 2010-04-09T09:31:36Z Indexed on 2010/04/14 11:43 UTC
Read the original article Hit count: 510

Filed under:
|

Is it possbile to move aotnode in axapta through code(I want to achive the same movement as done via alt-up, alt-down) Dynamics AX 2009 has AOTmove method, but when I try

#AOT
ProjectNode root;
//SysContextMenuAOT ctx = new SysContextMenuAOT();
ProjectGroupNode firstChild;
ProjectGroupNode secondChild;
;
//root=ctx.first();
root = infolog.projectRootNode().AOTfindChild("Private").AOTfindChild("TestProject");
root = root.getRunNode();

firstChild = root.AOTfirstChild();
secondChild = firstChild.AOTnextSibling();

secondChild = firstChild.AOTnextSibling();
secondChild.AOTMove(secondChild.AOTparent());

and then call it on whole project it successfully moves secondChildNode, BUT it deletes every subnode inside of secondChild.

© Stack Overflow or respective owner

Related posts about axapta

Related posts about AOT