Here is the sample code to retrieve table properties in Dynamics AX 2009.
static void TableProperties(Args _args)
{
Dictionary dictionary;
TableLabel tableLabel;
SysdictTable dTable;
TreeNode Tnode;
;
//initilize the data dictionary
dictionary = new Dictionary();
// Replace _tableId parameter with the actual table id
dTable = new SysDictTable(_tableId);
// initilize the tree node to traverse each property of the table
tNode = dTable.treeNode();
// Replace "Label" with any property name of the table. In this case I am getting table label and it will return label id
tNode.AOTgetProperty("Label");
// Get actual label from label file
print sysLabel::labelId2String(tNode.AOTgetProperty("Label"));
pause;
}
static void TableProperties(Args _args)
{
Dictionary dictionary;
TableLabel tableLabel;
SysdictTable dTable;
TreeNode Tnode;
;
//initilize the data dictionary
dictionary = new Dictionary();
// Replace _tableId parameter with the actual table id
dTable = new SysDictTable(_tableId);
// initilize the tree node to traverse each property of the table
tNode = dTable.treeNode();
// Replace "Label" with any property name of the table. In this case I am getting table label and it will return label id
tNode.AOTgetProperty("Label");
// Get actual label from label file
print sysLabel::labelId2String(tNode.AOTgetProperty("Label"));
pause;
}
Comments
Post a Comment
I will appreciate your comments !