static void TIDF_addFieldAOT(Args _args) { #AOT #TreeNodeSysNodeType TreeNode tableNode = TreeNode::findNode(#TablesPath).AOTfindChild('TIDProdPlanOverViewTmp'); AOTTableFieldList lst; int i; ; lst = tableNode.AOTfindChild("fields"); for(i=1;i<=31;i++) { lst.addDate(strFmt("date_%1",i)); } tableNode.AOTsave(); }
source :
http://www.junctionsolutions.com/dynamicsax/creating-pivot-table-forms-and-reports-in-ax/