
Inside my form I want to open another form. To achieve this goal without writing code I can use a Display Menu item, but I can also use a normal button to open it.
Using a normal button requires write some X++ code.
First create a button on your form’s Button group

Then override clicked() method

Use this example to open the form
[Control("Button")]
class FormButtonControl1
{
/// <summary>
///
/// </summary>
public void clicked()
{
Args args;
FormRun formRun;
super();
//Call the form directly.
Args = new Args(formStr(ots_GuidedSalesOrderEntryRulesZTEST)); //Write your form name here
formRun = New FormRun(Args);
formRun.init();
formRun.run();
}
}