Add Prompt window to form for grid filtering Method 2 in Ax 2009

public class FormRun extends ObjectRun

{
Bill_Table bt;
QueryRun queryRun;
QueryBuildDataSource qbd;
Bill_Table vendTable;
QueryBuildRange range,range1;
int ct, i;
Str ss,ss1;
}

Datasource Init
public void init()
{
// Query query = new Query();
super();
range =this.query().dataSourceNo(1).addRange(fieldnum(Bill_Table,ItemName));
range1 =this.query().dataSourceNo(1).addRange(fieldnum(Bill_Table,CustName));
queryRun = new QueryRun(this.query());
queryRun.prompt(); // To Prompt the dialog
ct = queryRun.query().dataSourceTable(tablenum(Bill_Table)).rangeCount();
range = queryRun.query().dataSourceTable(tablenum(Bill_Table)).range(1);
range1 = queryRun.query().dataSourceTable(tablenum(Bill_Table)).range(2);
// info(strfmt(“Range Field %1, Value %2, Value %3 “,range.AOTname(),range.value(),range1.value()));
ss=range.value();
ss1=range1.value();
}

Form Run
public void run()
{
super();
Bill_Table_ds.filter(fieldnum(Bill_Table,ItemName),ss);
Bill_Table_ds.filter(fieldnum(Bill_Table,CustName),ss1);
}

OUTPUT

prompt b4after

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