Open a form and its child form through code

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

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

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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