NAS / Navision Application Server problem

Hi Everyone,

I am facing a problem while interaction with NAS.The thing i want is a text file should get generated without any user interaction for this i am doing the following steps.

I have created a Codeunit in which i have wrote a small fuction for the creation of text file in c:. After that in codeunit 1(Application Management) in function NAS Handler

i have written the code for calling the above Codeunit but it will not creating the text file in c:

Can anybody help me out.


PR: wait… I: wait… L: wait… LD: wait… I: wait… wait… Rank: wait… Traffic: wait… Price: wait… C: wait…

What I would do:

Create a new codeunit that is singleinstance. I would put a Navisiontimer DLL (‘Navision Timer 1.0’.Timer) in it with property “WithEvents”=Yes.

This creates a new function “autNavisionTimer::Timer(Milliseconds : Integer)”.

In this function you put the code (=a functioncall : eg. : “CreateTheFile()”) to create the file.

In the OnRun-trigger, you must put some code to enable the timer. Something like this:

autNavisionTimer.Interval(recDownloadSetup.“NAS Timer Interval (s)” * 1000);

autNavisionTimer.Interval(timerinterval in milliseconds);
CreateTheFile(); // in case you want to create the file immediately when you launch the NAS:

And in codeunit 1 : launch this codeunit.

Hi kriki,

Thanks for your reply.

I have followed the above steps as told by you.

I have created a codeunit and set its property to SingleInstance and its onrun event i have put the following code.


In the above code F is file type of object.But now my problem is in Codeunit 1 where i have to put the code if in NASHANDLER than how i have to call the timer codeunit. If you can send me the sample of code then it will be good for me.


You must insert into codeunit 1 in function NASHandler.For example, to start ADCS it’s checked correct parameter.

“IF (COPYSTR(Parameter,1,4) = ‘ADCS’) THEN BEGIN”

You must insert a similar check for your string and insert it as start-up parameter for your NAS

Hi kriki,

I have inserted the code in code unit1 nashandler function but still file is not getting created.

After starting the service of NAS in Event Viewer i am finding a warning message i am pasting that message below.

The description for Event ID ( 20010 ) in Source ( RAVISHANKAR-CLASSIC ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: The network path cannot be found.

This message refers to the file .

The network server may be down, or the path may be invalid.

can you please see that problem and tell me where i am doing wrong.



Sorry it took so long to answer, but I have been on vacation and since I came back to work, I have been very busy.

Check if the login you use has Windows-permissions to write the file.