Showing posts with label Filter Data. Show all posts
Showing posts with label Filter Data. Show all posts

Thursday, 26 November 2015

How to Filter Data on one field Between Two Dates in X++

     In Data Source, Override Execute Query Method and Copy Below Code

    public void executeQuery()
   {
          date  fromdate = today()-7;
          date   todate       = today();
                   this.query().dataSourceTable(tablenum(InventTrans)).addRange(fieldnum(InventTrans,DatePhysical)).value(queryRange(fromdate,todate));

   }