导航

Business Unit Lookup in Form

Posted on 2015-06-04 14:53  Tokywu  阅读(182)  评论(0编辑  收藏  举报

Just add the below code in lookup() of StringEdit control in Form to get the Business Unit Lookup:

 

public void lookup()
{
Query query;
SysTableLookup sysTableLookup;
super();
 
//DimAttributeOMBusinessUnit is a View
sysTableLookup = SysTableLookup::newParameters(tableNum(DimAttributeOMBusinessUnit), this);
 
sysTableLookup.addLookupfield(fieldNum(DimAttributeOMBusinessUnit, Value));
sysTableLookup.addLookupfield(fieldNum(DimAttributeOMBusinessUnit, Name));
 
query = new Query();
 
query.addDataSource(tableNum(DimAttributeOMBusinessUnit));
 
sysTableLookup.parmQuery(query);
 
sysTableLookup.performFormLookup();
 
}