Hi Everybody,
I am having a problem where I just need to automate a posting using NAS. I know this is possible with NAS. In fcat I was able to setup an application server and I have defined a startupparameter when setting up the NAS. In the 'ApplicationManagement' code unit, I am trying to catch this varibale in the NASHandler event by placing the following code
IF (COPYSTR(Parameter,1,6) = 'MIBUSO') THEN
CODEUNIT.RUN(CODEUNIT::"Some Code Unit");
MIBUSO is the startupparameter given when setting up the Application server;
In the OnRun event of the code unit (Some Code Unit), I have given the following codes;
CREATE(autNavisionTimer);
autNavisionTimer.Interval(60000); // this will trigger every 10 seconds
autNavisionTimer.Enabled(TRUE);
MESSAGE('The NAS has been started.');
REPORT.RUN(6);
In the above codes, autNavisionTimer is defined as a follows
Name : autNavisionTimer
Type : Automation
Sub type : 'Navision Timer 1.0'.Timer
As you could see, I am trying to call the report at the end of the code,
Still I am unable to automate my posting. Can somebody suggests where I have done the mistake ? At the same time, I would like to know whether I have missed anything. I would greatly appreciate your ideas on this?
Thank you in advance,
PREMNAV
0
Answers
I think this hold all the answers to your questions.
Remember, Codeunit = SingleInstance and automation with events!
2. Using the built-in scheduler, but this will cost you if I'm correct (license)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.