Skip to main content

Posts

Showing posts with the label querybuilddatasource declaration

Add multiple range and multiple table lookup

This is a sample code to Add multiple range and multiple table lookup in Axapta. public void lookup() { SysTableLookup tableLookup; QueryBuildRange rangeTransDate; QueryBuildRange vlgCode,ItemId,DistCode,talCode; QueryBuildRange CropId; QueryRun queryRun; QueryBuildDataSource qbds,qbds1,qbr,qbr1,qbr2; Query q = new Query(); Query q1 = new Query(); QueryBuildLink QueryBuildLink1,QueryBuildLink2; _TmpLookup _TmpLookup1; InventTable InventTable_1; boolean flg; ; tableLookup = SysTableLookup::newParameters(tableNum(_TableDetails),this); qbr = q.addDataSource(tableNum(_TableDetails)); qbr2=qbr.addDataSource(tablenum(_Inspection1)); qbr2.joinMode(Joinmode::NoExistsJoin); QueryBuildLink2 = qbr2.addLink(fieldnum(_TableDetails, _TableNo),fieldnum(_Inspection1,TableNo)); // qbr2.addRange(fieldnum(_TableDetails,_TableNo)).value(queryNotValue(SysQuery::valueEmptyString())); qbr2.relations(true); if(tmpfilter.DistrictCode != ...