Can anyone help me to retrieve the list of all tables in ax 2009 with ID, Name and Label
Can anyone help me to retrieve the list of all tables in ax 2009 with ID, Name and Label
You already have X++ code doing that.
Use Business Connector to call X++ code AX 2009 from C#.
Hi,
I want to get the custom tables list from Dynamics AX 2009 through C#.
Could you please provide the sample code
Thanks
This job should do the trick.
static void TableList(Args _args) { tableId tableId; int tablecounter; Dictionary dict = new Dictionary(); for (tablecounter=1; tablecounter<=dict.tableCnt(); tablecounter++) { tableId = dict.tableCnt2Id(tablecounter); info(strFmt("TableId: %1 ; Name: %2 ; Lable: %3",tableId,tableid2name(tableId),tableid2pname(tableId))); } }
yeah you can get list as following
static void ListOfTables(Args _args) { UtilElements localEelmet; UtilEntryLevel LayerName = UtilEntryLevel::usr; TreeNode treeNode; ; while select localEelmet where localEelmet.utilLevel == LayerName && localEelmet.recordType == UtilElementType::Table { treeNode = xUtilElements::getNodeInTree(xUtilElements::parentElement(localEelmet)); info(strFmt("TableId: %1 ; Name: %2",localEelmet.TableId,localEelmet.name)); } }
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,263 Super User 2024 Season 2
Martin Dráb 228,112 Most Valuable Professional
nmaenpaa 101,148