Hi Everyone,
Iam new to X++ coding and axapta…Any one please tell me about the usage of args class in axapta.
Please send me some useful links for knowing more about args class/Various ways to use args class…and its implementation…
Thanks in Advance.
hi vinay,
actually args are used to pass objects ,string field, total table and enum from table to class ,forms and others.
this is used when we are creating class for the process , forms behave differentlly at diff places based on the record selected an one form. and more
Hi Vinay
See this example for ur reference…
Code Written in Button click of Called Object
void clicked()
{
Args args = new Args();
;
args.caller(this);//know the exact use of this…
//args.record(Calling::find(‘Vinay’));
args.parm(“hello”);
args.parmEnumType(Enumnum(ABC));
args.parmEnum(ABC::B);
args.record(calling);
new MenuFunction(MenuItemDisplayStr(CallerMI),MenuItemType::Display).run(Args);
}
Code Written in Init of Caller Object
public void init()
{
Calling calling;
;
super();
info(element.args().parm());
info(element.args().parmEnum());
calling = element.args().record();
info(Calling.Firstname);
}
Output will be Displayed as
Hello
2
Santhosh