Hi Guys,
Today I would like to share you how to pass arguments from one form to another form in AX 2012
Create Two New Table and Two New Form
For an example , I have created two new Table and two new Form
Table 1: SheetTable
Table 2:SheetDetails
Form 1 :SheetTable , Datasource Name : SheetTable
Create Ok Button in SheeTable Form
Write a piece of logic in the clicked method
args.parm(SheetTable.SheetId);
formrun.run();
formrun.wait();
Happy Daxing........
Today I would like to share you how to pass arguments from one form to another form in AX 2012
Create Two New Table and Two New Form
For an example , I have created two new Table and two new Form
Table 1: SheetTable
Table 2:SheetDetails
Form 1 :SheetTable , Datasource Name : SheetTable
Create Ok Button in SheeTable Form
Write a piece of logic in the clicked method
void
clicked()
{
Args
args;
FormRun
formRun;
super();
args
= new
args();args.parm(SheetTable.SheetId);
args.record(SheetTable);
args.name(
formstr(
SheetDetails ) );
formRun
= classFactory.formRunClass( Args );
formRun.init();formrun.run();
formrun.wait();
}
Form 2: SheetDetails , DataSource Name : SheetDetails
write a piece of code in Form level init() method
public
void
init()
{
Query
query;
QueryBuildRange
qbr;
SheetTable
_sheetTable;
SheetDetails
sheetDetails1;
Str
_parmid;
super();
_sheetTable
= element.args().record();
_parmid=
element.args().parm();
query=
new
Query();
qbr=query.addDataSource(tableNum(SheetDetails)).addRange(fieldNum(SheetDetails,SheetId));
qbr.value(_parmid);
SheetDetails_ds.query(query);
}
Output:
That's it ..........We have done it Happy Daxing........
great. thanks
ReplyDeleteok
ReplyDelete