Table names and Total number of record of AOT in axapta you can write following code in job .
#AOT Name TableName;
NumberOf TotalRecord;
TrNode TrNode;
SysDictTable SysDictTab;
;
TrNode = TrNode::findNode(#TablesPath);
TrNode = TrNode.AOTfirstChild();
while (TrNode)
{
TableName = TrNode.AOTname();
SysDictTab = SysDictTable::newTableId(TrNode.applObjectId());
TotalRecord = SysDictTab.recordCount(false);
if (TotalRecord)
info (strfmt("Table Name - Record count", TableName, TotalRecord));
TrNode = TrNode.AOTnextSibling();
}
#AOT Name TableName;
NumberOf TotalRecord;
TrNode TrNode;
SysDictTable SysDictTab;
;
TrNode = TrNode::findNode(#TablesPath);
TrNode = TrNode.AOTfirstChild();
while (TrNode)
{
TableName = TrNode.AOTname();
SysDictTab = SysDictTable::newTableId(TrNode.applObjectId());
TotalRecord = SysDictTab.recordCount(false);
if (TotalRecord)
info (strfmt("Table Name - Record count", TableName, TotalRecord));
TrNode = TrNode.AOTnextSibling();
}
No comments:
Post a Comment