Blog Archive
Tuesday, November 2, 2010
Object 'FormRun' could not be created
Issue & Cause:
When opening report from Ax, if you are coming across this error, the main reson might be args are not getting passed from Form or to formfrom classes.
Solution:
Check the main method , it should be using client keyword, since args were passed from client.
Example : Public client static void main(Args _args)
Subscribe to:
Post Comments (Atom)
Hello,
ReplyDeleteIn dynamics ax 2012 “The FormRun object could not be created”
code:
void GNP_VendInvoiceJourAddData_Clicked(FormButtonControl _formButtonControl)
{
DictTable dictTable;
Form formAddData;
FormBuildDataSource fbDatasource;
FormRun formRun;
Args args;
;
dictTable = new DictTable(tableNum(GNP_VendInvoiceJourAddData));
formAddData = new Form();
formAddData.name(“GNP_VendInvoiceJourAddData”);
fbDatasource = formAddData.addDataSource(dictTable.name());
fbDatasource.table(dictTable.id());
args = new Args();
args.object(formAddData);
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
formRun.detach();
}
stop code in “FormRun formRunClass(xArgs args)”
Please help.