Form Lookup: Getting records against company
public void lookup()
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup;
AweFinDimMappingView findingEntity;
select firstOnly CompanyCode from findingEntity where findingEntity.CompanyCode == curext();
sysTableLookup = SysTableLookup::newParameters(tableNum(AweFinDimMappingView), this);
sysTableLookup.addLookupField(fieldNum(AweFinDimMappingView, Location));
sysTableLookup.addLookupField(fieldNum(AweFinDimMappingView, Description));
queryBuildDataSource = query.addDataSource(tableNum(AweFinDimMappingView));
queryBuildDataSource.addRange(fieldNum(AweFinDimMappingView, Location));
if (findingEntity.CompanyCode)
{
queryBuildDataSource.addRange(fieldNum( AweFinDimMappingView, CompanyCode)).value(findingEntity.CompanyCode);
}
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
//super();
}
No comments:
Post a Comment