If let's say there is a requirement to show a filter query where user can add different ranges he wants and once he clicks 'Ok', based on the query selected by user, the form should render. Or let's say we need to show the filter query button which will be same as the 'Records to include' in SSRS reports. on a form so when user clicks the button then it will show a form where should be able to add ranges.
So, how is this possible by X++ and Query classes?
Let's not wait and will check the plan.
public void init()
{
super();
Query query = new Query();
SysQueryRun queryRun;
query = CustInvoiceTrans_ds.query();
queryRun = new SysQueryRun(new Query(query));
queryRun.args().caller(this);
queryRun.title("Invoice Journal Report");
queryRun.args().allowUseOfPreloadedForm(false);
queryRun.promptAllowAddRange(QueryAllowAdd::NoFields);
if (queryRun.prompt())
{
CustInvoiceTrans_ds.query(queryRun.query());
}
else
{
element.close();
}
}

Like
Report
*This post is locked for comments