Wednesday, May 30, 2018

lookupReference method in my ReferenceGroup

I override this lookupReference method in my ReferenceGroup. 
public Common lookupReference()
{
//FormReferenceControl _formReferenceControl;
SysReferenceTableLookup sysTableLookup = SysReferenceTableLookup::newParameters(tableNum(myTable), this);
Query testQuery;
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));
//sysTableLookup.addLookupfield(fieldNum(myTable, RecId));
// sysTableLookup.addLookupfield(fieldNum(myTable, ProductTypeName));
sysTableLookup.addLookupfield(fieldNum(myTable, ProductTypeID));
// Create a custom Query
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

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...