Open a form and its child form through code

Args                    argsForm;
FormRun             formRun;
FormRun             subformRun;
argsForm = new Args(formstr(SalesTable));
formRun = classFactory.formRunClass(argsForm);
//Now open sub-form ((InventOnHandReserve)
argsForm = new Args(formstr(InventOnHandReserve));
//Here you can mention the parent form instance as an active buffer
argsForm.record(SalesLine::find(“S0000548”, 1));

subformRun = classFactory.formRunClass(argsForm);
formRun.close(); //Now close the parent form.
subformRun.wait(); //This halts your programme execution.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s