zoukankan      html  css  js  c++  java
  • AX Query分页

     1 static void Job_Testing(Args _args)
     2 {
     3     Query            query = new Query();
     4     QueryBuildDataSource qbds;
     5     QueryRun          qr;
     6     TableID           tableId;
     7     int               icount = 0;
     8     ;
     9     tableid = tablename2id('CustTable');
    10     qbds = query.addDataSource(tableId);
    11     
    12     //IMPORTANT: Order by item id
    13     qbds.addOrderByField(fieldname2id(tableid,'AccountNum'));
    14     qr = new QueryRun(Query);
    15     
    16     //IMPORTANT:  Enable position paging for the queryrun object
    17     qr.enablePositionPaging(true);
    18 
    19   //IMPORTANT: Add a range by providing the parameters as starting record number and number of records
    20     qr.addPageRange(1,1);
    21     while (qr.next())
    22     {
    23         icount++;
    24     }
    25     print icount;
    26     pause;
    27 }
  • 相关阅读:
    学习小记: Kaggle Learn
    eclipse 一些快捷键
    Map接口
    学习笔记
    泛型方法 类 接口
    TreeSet
    xml
    Java笔试题目-my
    迭代器三种遍历方法
    线程请求其他线程资源
  • 原文地址:https://www.cnblogs.com/Jinnchu/p/2658767.html
Copyright © 2011-2022 走看看