how to using X++ Create table in shared project?

I’m Ashok Eerla,

how to create a table using x++ in a shared project using the macros

Does it mean that you want to automatically create a new table in AOT and add it to an existing AOT project?

Yes , While creating table in x++ it must add AOT as well as My project also

Create Table through X++

#AOT
TreeNode newTableNode = TreeNode::findNode(#TablesPath).AOTadd('NewTable');
ProjectNode projectNode = SysTreeNode::getSharedProject().AOTfindChild('ExistingProject');
;
newTableNode.AOTsave();

projectNode.addNode(newTableNode);
projectNode.AOTsave();

Fine, Then If I want to add table in project AOT?

Hi,

Please read Martin’s reply properly. He already gave you the solution.