how to call a form using X++
1.create a button group in action pane
2.create a button for that button group
3.override the clicked method and write the paste the following code
or
1.follow the first step
2.create a menu item button.
3.after creating MI button.
4.go to properties give menu item name and menu item type
[Form]
public class SportsForm extends FormRun
{
[Control("Button")]
class SportsButton
{
/// <summary>
///
/// </summary>
public void clicked()
{
Args args;
FormRun formRun;
super();
//Call the form directly.
Args = new Args(formStr(RAR_PurgeDailyStockForm)); // name of the form you want to call
formRun = New FormRun(Args);
formRun.init();
formRun.run();
formRun.wait();
}
}
}
Comments
Post a Comment