CREATE DYNAMIC QUERY IN AX X++ CODE WITH FILTER
public void qUERYdYNAMICS() { Query q; QueryRun qr; QueryBuildDataSource qbd; QueryBuildRange qbr; q = new Query(); qbd = q.addDataSource(TableNum(CustTable)); qbr = qbd.addRange(FieldNum(CustTable, AccountNum)); qbr.value(">=4000"); // Default operator is ==. qbr = qbd.addRange(FieldNum(CustTable, AccountNum)); qbr.value("<=4022"); qbd.addSortField(FieldNum(CustTable, DlvMode)); qr = new QueryRun(q); qr.prompt(); pause; }
No comments:
Post a Comment