Reg. lookup

Hi,

I have a lookup of Production Order in InventTransferTable form, I am facing an an issue, that whenever I select any record in Purchase Order column, the same record got updated in all upwards and downwards rows…

Please guide

share the lookup code…

public void lookup()

{

//super();

Query query = new Query();

QueryBuildDataSource queryDataSourceCode;

QueryBuildRange queryBuildRange;

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(ProdTable), this);

;

sysTableLookup.addLookupField(fieldNum(ProdTable, ProdId));

queryDataSourceCode = query.addDataSource(tableNum(ProdTable));

queryBuildRange = queryDataSourceCode.addRange(fieldNum(ProdTable, ProdStatus));

queryBuildRange.value(enum2str(ProdStatus::CostEstimated));

sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

}

what is the form name exactly.

Form Name : InventTransferOrders

Requirement : Actually I have to make a lookup of Production Order , in OVERVIEW tab…

Issue Facing : Let suppose I have 5 Records (Rows ), now I am facing problem that, while selecting an Production Order for record 1 , same production order is also getting selected automatically for all other record also…

You can view my issue thru Team Viewer also.

modify the code as shown below. and save the form and restore the form.

public void lookup()

{

//super();

Query query = new Query();

QueryBuildDataSource queryDataSourceCode;

QueryBuildRange queryBuildRange;

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(ProdTable), this);

;

queryDataSourceCode = query.addDataSource(tableNum(ProdTable));

queryBuildRange = queryDataSourceCode.addRange(fieldNum(ProdTable, ProdStatus));

queryBuildRange.value(enum2str(ProdStatus::CostEstimated));

sysTableLookup.addLookupField(fieldNum(ProdTable, ProdId));

sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

}

it should work…

hey bikku is that working?..

yes

Dear sudhanshu,

it’s same line of code which i have given you, nothing different thing.

Rgds

BK

Dear Bablu,

The issue is resolved. It was minor mistake.