How we Open any form in MS Dynamics AX Using X++ ?
void run()
{
Args args =new Args();
PurchLine PurchLine;
FormRun formRun;
InventBatch _InventBatch;
;
select _InventBatch where PurchLine.ItemId==Inventbatch.itemId && Purchline.PurchId==InventBatch.ReqNo;
args.name(formstr(InventBatch));
args.record(_InventBatch); // as argument is optional
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.detach();
super();
}
{
Args args =new Args();
PurchLine PurchLine;
FormRun formRun;
InventBatch _InventBatch;
;
select _InventBatch where PurchLine.ItemId==Inventbatch.itemId && Purchline.PurchId==InventBatch.ReqNo;
args.name(formstr(InventBatch));
args.record(_InventBatch); // as argument is optional
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.detach();
super();
}
Comments