public void lookup()
{
Query query = new Query();
QueryBuildDataSource qbdsItem;
QueryBuildDataSource qbdsInventTableModule,qbdsInvent;
QueryBuildDataSource qbdsInventItemLocation;
QueryBuildRange qbrModuleType;
SysMultiTableLookup sysTableLookup;
;
qbdsItem = query.addDataSource(tableNum(prodBom));
qbdsInventTableModule = qbdsItem.addDataSource(tableNum(inventdim), "Purch");
qbdsInventTableModule.relations(true);
if(S3RejectionLine_ProdId.valueStr())
{
qbdsItem.addRange(fieldnum(prodBom,Prodid)).value(S3RejectionLine_ProdId.valueStr());
}
qbdsInventTableModule.fetchMode(QueryFetchMode::One2One);
sysTableLookup = SysMultiTableLookup::newParameters(this, query);
sysTableLookup.addLookupField(fieldNum(prodBom, recid));
sysTableLookup.addLookupField(fieldNum(prodBom, ItemId),1,false,'Itemid');
sysTableLookup.addLookupMethod('ItemName',1,'ItemName');
sysTableLookup.addLookupField(fieldNum(inventdim, InventSizeId), 2, false, "InventSizeId");
sysTableLookup.addLookupField(fieldNum(inventdim, InventLocationId), 2,false,"InventLocationId");
sysTableLookup.addLookupField(fieldNum(inventdim, configId), 2,false,"configId");
sysTableLookup.performFormLookup();
}
{
Query query = new Query();
QueryBuildDataSource qbdsItem;
QueryBuildDataSource qbdsInventTableModule,qbdsInvent;
QueryBuildDataSource qbdsInventItemLocation;
QueryBuildRange qbrModuleType;
SysMultiTableLookup sysTableLookup;
;
qbdsItem = query.addDataSource(tableNum(prodBom));
qbdsInventTableModule = qbdsItem.addDataSource(tableNum(inventdim), "Purch");
qbdsInventTableModule.relations(true);
if(S3RejectionLine_ProdId.valueStr())
{
qbdsItem.addRange(fieldnum(prodBom,Prodid)).value(S3RejectionLine_ProdId.valueStr());
}
qbdsInventTableModule.fetchMode(QueryFetchMode::One2One);
sysTableLookup = SysMultiTableLookup::newParameters(this, query);
sysTableLookup.addLookupField(fieldNum(prodBom, recid));
sysTableLookup.addLookupField(fieldNum(prodBom, ItemId),1,false,'Itemid');
sysTableLookup.addLookupMethod('ItemName',1,'ItemName');
sysTableLookup.addLookupField(fieldNum(inventdim, InventSizeId), 2, false, "InventSizeId");
sysTableLookup.addLookupField(fieldNum(inventdim, InventLocationId), 2,false,"InventLocationId");
sysTableLookup.addLookupField(fieldNum(inventdim, configId), 2,false,"configId");
sysTableLookup.performFormLookup();
}
No comments:
Post a Comment