public void lookup()
{
//super();
// Added by Vasanth Arivali
// Declaration
Query LookupQuery = new Query();
QueryBuildDataSource LookupQueryBuildDataSource;
QueryBuildRange LookupQueryBuildRange;
SysTableLookup CustomSysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), this);
;
// Add fields that you want in Lookups
CustomSysTableLookup.addLookupField(fieldNum(InventTable, ItemId));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemName));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemGroupId));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,NameAlias));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemType));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,DimGroupId));
// Add DataSource, Range and Value
LookupQueryBuildDataSource =LookupQuery.addDataSource(tableNum(InventTable));
LookupQueryBuildRange=LookupQueryBuildDataSource.addRange(fieldNum(InventTable,ItemVisibility));
LookupQueryBuildRange.value(queryValue(NOYESCOMBO::Yes));
// Execute the Query
CustomSysTableLookup.parmQuery(LookupQuery);
CustomSysTableLookup.performFormLookup();
// Added by Vasanth Arivali
}
{
//super();
// Added by Vasanth Arivali
// Declaration
Query LookupQuery = new Query();
QueryBuildDataSource LookupQueryBuildDataSource;
QueryBuildRange LookupQueryBuildRange;
SysTableLookup CustomSysTableLookup = SysTableLookup::newParameters(tableNum(InventTable), this);
;
// Add fields that you want in Lookups
CustomSysTableLookup.addLookupField(fieldNum(InventTable, ItemId));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemName));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemGroupId));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,NameAlias));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,ItemType));
CustomSysTableLookup.addLookupField(fieldNum(InventTable,DimGroupId));
// Add DataSource, Range and Value
LookupQueryBuildDataSource =LookupQuery.addDataSource(tableNum(InventTable));
LookupQueryBuildRange=LookupQueryBuildDataSource.addRange(fieldNum(InventTable,ItemVisibility));
LookupQueryBuildRange.value(queryValue(NOYESCOMBO::Yes));
// Execute the Query
CustomSysTableLookup.parmQuery(LookupQuery);
CustomSysTableLookup.performFormLookup();
// Added by Vasanth Arivali
}