Linking datasource using query in form:

Hi,
Linking a datasource in form by using query….
The below code is used to filter the customers against whom atleast one Sales order has been raised..

public void init()
{
querybuilddatasource qbds, qbds1;
;

super();
qbds = custtable_ds.query().dataSourceTable(tablenum(custtable));
qbds1 = qbds.addDataSource(tablenum(salestable));
qbds1.joinMode(joinmode::ExistsJoin);
qbds1.addLink(fieldnum(custtable, accountnum), fieldnum(salestable, custaccount));
}

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