static voidOpenForm_ThroughCode(Args _args)
{
Args args;
Object formRun;
// open form
args = new Args();
args.name(formstr(FormName));
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
}If you want to pass a record to open a form
args = newArgs();
args.record(ProjTable::find('PR00001'));
args.name(formstr(FormName));
formRun = classfactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.wait();
How to retrieve these args on caller form's init()
{
ProjTable projTableLocal;
super();
projTableLocal = element.args().record();
}
Call A Form Using A Menu Item
[Form]
public class rsmModel extends FormRun
{
[Control("Button")]
class FormButtonControlMake
{
/// <summary>
/// Call the rsmMake form
/// </summary>
public void clicked()
{
Args args;
FormRun formRun;
super();
//Call the form using a Menu Item
args = new Args();
formRun = new menufunction(menuItemDisplayStr(rsmModel), MenuItemType::Display).create(args);
formRun.init();
formRun.run();
formRun.wait();
}
}
}
No comments:
Post a Comment