Hi,
we recently updated to NAV 2016. I am currently looking for a way to run an external program (Zip program with password encryption).
Please respect the following conditions:
- Transfer of parameters at called program
- Program should be executed by a job queue
- Program should always run on the server (so that you can restart the job queue entry manually, no installation of the program on all clients)
I've tried the dotNet type System.Diagnostics.Process.System so far, but when running on the job queue it comes to the error message that a client callback of the function is not supported (ProcessShell: = ProcessShell.Process;).
And with a 'Windows Script Host Object Model'.WshShell the program seems to be executed only on the client computer.
Maybe someone else has an idea how to implement such a constellation under the 3-tier architecture. I'm grateful for every hint.
0
Answers
You can run an external program by the following code:
But the dubugger stops at the first line with error message "Client callbacks are not supported on Microsoft Dynamics NAV Business Web Services." when running the codeunit in a job queue.
It runs fine when I start the codeunit manually.
The property of ProcessShell variable is probably set to RunOnClient Yes. So in case of a webservice call you can define an other variable ProcessShell2 set To RunOnClient No.
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/