Wednesday, January 14, 2009

How to count the number of record in a table

static void recordCountGeneric( Args _args)
{
    int64 getRecordCount( str _tname)
    {
        common  common;
        SysDictTable    dictTable = new SysDictTable( tableName2id( _tname));
        ;
        
        common = dictTable.makeRecor d();
        
        select count(RecId) from common;
        return common.RecId;
    }
    ;
    
    info(strfmt("Number of records in %1 is %2", "CustTable", getRecordCount("CustTable")));
}
 

How to identify the user that was used to change an object from AOT in AX2012

Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...