Bojensen Blogs

How to read filters from form grid in AX2012

This part changed in AX2012, because filters are used instead of ranges (see a bit more about them here).

You can get filter values by this code:

Query q = InventSum_ds.queryRun().query();
QueryFilter qf;
int i;

for (i = 1; i <= q.queryFilterCount(); i++)
{
    qf = q.queryFilter(i);
    info(strFmt("%1: %2", qf.field(), qf.value()));
}

 

Comments are closed.