I override this lookupReference method in my ReferenceGroup.
public Common lookupReference()
{
//FormReferenceControl _formReferenceControl;
SysReferenceTableLookup sysTableLookup = SysReferenceTableLookup::newParameters(tableNum(myTable), this);
{
//FormReferenceControl _formReferenceControl;
SysReferenceTableLookup sysTableLookup = SysReferenceTableLookup::newParameters(tableNum(myTable), this);
Query testQuery;
QueryBuildDataSource qbds;
QueryBuildDataSource qbds;
QueryBuildRange qbr;
Common selectedRecord;
str test;
// Display the coulmns fields in the lookup form.
testQuery= new Query();
//test = strFmt('(%1 == Final)',fieldStr(myTable, ProductTypeID));
testQuery= new Query();
//test = strFmt('(%1 == Final)',fieldStr(myTable, ProductTypeID));
//sysTableLookup.addLookupfield(fieldNum(myTable, RecId));
// sysTableLookup.addLookupfield(fieldNum(myTable, ProductTypeName));
sysTableLookup.addLookupfield(fieldNum(myTable, ProductTypeID));
// sysTableLookup.addLookupfield(fieldNum(myTable, ProductTypeName));
sysTableLookup.addLookupfield(fieldNum(myTable, ProductTypeID));
// Create a custom Query
qbds = testQuery.addDataSource(tableNum(myTable));
qbds = testQuery.addDataSource(tableNum(myTable));
qbds.addRange(fieldnum(myTable, ProductTypeID)).value('Final');
sysTableLookup.parmQuery(testQuery);
selectedRecord = sysTableLookup.performFormLookup();
return sysTableLookup.performFormLookup();
//return sysTableLookup.performFormLookup();
}
No comments:
Post a Comment