Sunday, March 7, 2021

CoC Lookup on form datasource

 [ExtensionOf(formDataFieldStr(InventNonConformanceTableCreate,InventNonConformanceTable,MyStingControl))]

final class FARInventNonConfTableCreateFrmCtrl_Extension
{
public void lookup(FormControl _control,str _filter)
{
next lookup(_control,_filter);

Query query = new Query();
query.addDataSource(tableNum(DirOrganization));

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(DirOrganization),_control);

sysTableLookup.addLookupfield(fieldNum(DirOrganization,PartyNumber));
sysTableLookup.addLookupfield(fieldNum(DirOrganization,Name));

sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}

}

Debug in a Tier-2 (UAT) environment

 From time to time, you may have to debug a copy of the production database, but you are unable to export & import the DB to your dev ma...