Custom look up in Form

Hi,

Below is the sample code used to build a custom lookup on control.

public void lookup()

{

Query query = new Query();

QueryBuildDataSource qbs;

QueryBuildRange qr;

SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(MZK_Goals), this);

sysTableLookup.addLookupField(fieldNum(MZK_Goals, GoalNo));

sysTableLookup.addLookupField(fieldNum(MZK_Goals, Goals));

qbs = query.addDataSource(tableNum(MZK_Goals));

qr = qbs.addRange(fieldNum(MZK_Goals, HcmGoalType));

qr.value(MZK_MassGoalEnrollmentHeader_HcmGoalType.valueStr());

sysTableLookup.parmQuery(query);

sysTableLookup.performFormLookup();

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s