Monday, May 14, 2012

Get underlying SQL query using getSQLStatement [Dynamics AX 2012]


static void SR_getSQLStatement(Args _args)
{
    CustTable custTable;
    CustTrans custTrans;
    ;
   
    select generateonly firstOnly AccountNum, CustGroup
        from custTable join custTrans where custTrans.AccountNum == custTable.AccountNum;
    info(custTable.getSQLStatement());

}

No comments:

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...