Arne
2010-07-23 08:36:54 UTC
Hi.
Just found out something strange about ChangeCompany and
appl.setDefaultCompany.
That I cannot pass a record as record parameter in the Args when opening a
form in another company. The problem then is that during the init method of
the form the application changes back to the original company.
And when I set element as caller in the Args, call a method on the caller in
the new forms init method and set the record that way. It all works perfect.
appl.setDefaultCompany(companyB,false);
args.record([tablename]); //does not work
formrun = new Menufunction(menuItemdisplaystr([MenuItemName],
MenuItemType::display).create(args);
formrun.init(); // changes back to original company here
formrun.run();
formrun.wait();
appl.setDefaultCompany(companyA,false);
Can anybody explain why this does not work, when obtaining the table through
the called forms init method works perfect?
Just found out something strange about ChangeCompany and
appl.setDefaultCompany.
That I cannot pass a record as record parameter in the Args when opening a
form in another company. The problem then is that during the init method of
the form the application changes back to the original company.
And when I set element as caller in the Args, call a method on the caller in
the new forms init method and set the record that way. It all works perfect.
appl.setDefaultCompany(companyB,false);
args.record([tablename]); //does not work
formrun = new Menufunction(menuItemdisplaystr([MenuItemName],
MenuItemType::display).create(args);
formrun.init(); // changes back to original company here
formrun.run();
formrun.wait();
appl.setDefaultCompany(companyA,false);
Can anybody explain why this does not work, when obtaining the table through
the called forms init method works perfect?