Hi,
I think the fields vendaccountnum and name are from same tables .
Please try the below code.
Please create a stringedit field in your form and overwrite the lookup method for that field and you will able to get the desired output.
public void lookup()
{
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildDataSource QbdsJoin;
SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(PurchTable), this);
;
super();
qbds = query.addDataSource(tableNum(PurchTable));
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(PurchTable, OrderAccount));
sysTableLookup.addLookupfield(fieldNum(PurchTable, PurchName));
sysTableLookup.performFormLookup();
}
Please mark the answer verified if found useful.
Regards,