So...
Make an Action on a page that does:
PAGE.RUN(PAGE::"Sales Orders");
SLEEP(30000);
You'll wait for 30 seconds, then see a Sales Order Page.
Why?
Obviously, this is a pointless example, but I'm working on change in 2013 that requires a page to open, then other actions to happen after (with the page still open, which is why RUNMODAL won't do). Why are Pages opened at the very end, regardless of how it is coded?
Edit: Even trying to 'trick it' through the automation Script Host Model, with a
ScriptHostObject.Run('dynamicsnav:////runpage?page=9305&mode=view');
call doesn't help.
Comments
//PDF printer automation code here
REPORT.RUNMODAL(REPORT::"Report to be PDFed");
//Code here to pick up the PDF and do something with it
//Endpoint
The report was not run and the PDF was not created until the "Endpoint" was hit. If I did something that returned control to the user interface, like a CONFIRM prompt after the REPORT.RUNMODAL, it would generate the PDF at that point. I don't know if this will work in your case, but through trial and error I found that if I simply opened and closed a Dialog window, it had the same effect and things worked okay. i.e.:
//PDF printer automation code here
REPORT.RUNMODAL(REPORT::"Report to be PDFed");
Dialog.OPEN;
Dialog.CLOSE;
//Code here to pick up the PDF and do something with it
//Endpoint
http://www.epimatic.com
The server does not call back to the client if the action does not impact the state of the AL session. The dialog.open may change the state of the AL session and hence it is executed right away.
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
http://www.epimatic.com