Hi
I am able to pass single parameter from one form to other from the below code.Please send the code to pass multiple parameter using the below method.
void clicked()
{
Args _args;
FormRun _formRun;
ItemRelation _ItemRelation;
AccountNum _accountnum;
PriceDiscAdmTrans apricediscadmtrans;
;
_ItemRelation = PriceDiscAdmTrans.ItemRelation;
_accountnum = PriceDiscAdmTrans.AccountRelation;
apricediscadmtrans = pricediscadmtrans_ds.getFirst(true);
_args = new Args();
_args.name(formstr(GACC_PurchPriceHist));
_args.caller(this);
_args.parm(_ItemRelation);
_args.parm(_accountnum);
_args.record(PriceDiscAdmTrans);
_formRun = ClassFactory.formRunClass(_args);
_formRun.init();
_formRun.run();
_formRun.wait();
_args.parmObject( _args );
}
public void init()
{
Query query;
QueryRun queryRun;
QueryBuildDataSource qbds;
QueryBuildRange qbr,qbr1;
;
switch(element.args().dataset
{
case tablenum(PriceDiscAdmTrans):
{
_ItemRelation = element.args().parm();
_accountnum = element.args().parm();
query = new Query();
qbr = query.addDataSource(tablenum(PriceDiscAdmTrans)).addRange(fieldnum(PriceDiscAdmTrans,ItemRelation));
qbr1 = query.addDataSource(tablenum(PriceDiscAdmTrans)).addRange(fieldnum(PriceDiscAdmTrans,AccountRelation));
info(PriceDiscAdmTrans.getSQLStatement());
PriceDiscAdmTrans_ds.query(query); // execution of the query
break;
}
}
super();
}
Thanks
*This post is locked for comments