Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: Query Limit

$
0
0

    Query query = new Query();

     QueryBuildDataSource qbds;

     QueryRun queryRun;

     CustTable custTable;

     //Add a datasource to a query

    qbds = query.addDataSource(tablenum(CustTable));  

    //Order by accountnum

    qbds.addOrderByField(fieldnum(CustTable, AccountNum));

    //Instantiate a Queryrun class

   queryRun= new QueryRun(Query);

   queryRun.literals(true);

   // Enable position paging for the queryrun object

    queryRun.enablePositionPaging(true);

    //Provide page range

    queryRun.addPageRange(1,10);

    while (queryRun.next())

    {

         custTable= queryRun.getNo(1);

         info(strFmt("% 1 :", custTable.AccountNum));

    }


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>