void clicked() { CustTable custTable; FormRun formRun; Args args = new Args(); ; // Just selecting a random record in CustTable select firstonly custTable; // This is the name of the form you are opening args.name(formstr(CustTable)); // This is the optional record you are passing it args.record(custTable); // This builds the formrun formRun = ClassFactory.formRunClass(args); formRun.init(); formRun.run(); // This waits until the form closes if (!formRun.closed()) formrun.wait(true); }
This technical blog will be about my adventures with Microsoft Dynamics 365 for Operations (AX7/D3fo), AX 2012, and AX 2009.
Showing posts with label modal. Show all posts
Showing posts with label modal. Show all posts
Tuesday, November 15, 2011
How to call a form from code and make it modal
This is how to open a form from X++ and set it modal. Modal means it is on top of the other windows and you can not click on the ones behind it. I have this just in a clicked event on a button.
Subscribe to:
Posts (Atom)