By using args we can call the form or different types of menu items.
Args in D365FO.
Args args = new Args(); FormRun formRun; args = new Args(); //args = new Args(formstr(Myform)); args.parm('Value');//string value args.name(formstr(Myform));//child form name args.record(custTable);//Table buffer args.parmEnumType(EnumNum(NoYes));//ENum args.parmEnum(NoYes::Yes);//Enum elements args.parmobject(myList);//Objects we can pass args.caller(this);//element // Open mode //args.parmEnumType(enumNum(FormOpenMode)); //args.parmEnum(FormOpenMode::ForEdit);
Way 1:
formrun = classfactory.formrunclass(args);
formrun.init();
formrun.run();
formrun.wait();
formDataSource = formrun.dataSource();
table buffer = formDataSource.cursor().data();
Way 2:
new MenuFunction(menuitemdisplaystr(menu item name),
MenuItemType::Display).run(args);
If (menuFunction.checkAccessRights())
{
}
Comments
Post a Comment