static void startForm(Args _args) { FormRun formRun; Args args; changeCompany('usmf') { args = new Args(); args.name(formstr(TestForm)); formRun = ClassFactory::formRunClassOnClient(args); formRun.init(); formRun.run(); formRun.detach(); } }TestForm is simple form without datasource and only one button which displays infolog with current company:
void clicked() { super(); info(curext()); }Bad thing is that it will not work as expected and if you change the window to the form which is in other company and then switch back and press the button to diplsay current company you surprisingly will not see usmf, instead there will be company of another form.
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units.
Join us.