Using SysTableLookup class in Ax 2012

Below is sample script i used for lookup in field :

public void lookup()
 {
 //super();
 xxxTaxNumberingLine xxxTaxNumberingLine;
 SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(xxxTaxNumberingLine),this);
 Query query = new Query();
 QueryBuildDataSource queryBuildDataSource = query.addDataSource(tableNum(xxxTaxNumberingLine));
 ;
sysTableLookup.addLookupfield(fieldNum(xxxTaxNumberingLine, FakturPajakNum));
 queryBuildDataSource.addRange(fieldNum(xxxTaxNumberingLine, Status)).value(queryValue(FakturPajakStatus::Free));
 queryBuildDataSource.addRange(fieldNum(xxxTaxNumberingLine, DatAreaId)).value(queryValue(curext()));
sysTableLookup.parmQuery(query);
 sysTableLookup.performFormLookup();
 }

About this entry