Thursday, December 18, 2008

List the datasources of a query object

Here is how you can make a list of datasources from a query object. 

Query                query;
QueryBuildDataSource qbds;
Counter              child;
List                 listDataSources = new List(types::Class); 
ListEnumerator       le;


query = new Query(QueryStr(CustBillOfExchangeJourUpdate)); 


for (child = 1; child <= query.dataSourceCount(); child++)
    listDataSources.addEnd(query.dataSourceNo(child));


le = listDataSources.getEnumerator(); 


while (le.moveNext())
    qbds = le.current(); 
    info (TableId2Name(qbds.table()));
}

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