posting in NAS

Hello all, I’m currently developing some kind of mobile addon to Navision using a TCP Socket based interface. Everything is working fine as long as I’m running the CU in a Navision client. My documents are getting posted. No problems at all. Once I’m trying the same action with the NAS running the same CU I’m getting problems performing exactly the same action. IF NOT CODEUNIT.RUN(CODEUNIT::"POS Doc. Closing",POSHeader) THEN ErrorText := 'Could not post Document' ELSE MessageText := 'Document successfully posted'; So what to hell am I doing wrong ? Is there any way to use the Navision Debugger together with the NAS ?. Running 3.70.B W1 Native

Hello Tomas, Have you got your NAS working with a simple CU just to send a message to the Event Viewer. Things to check with NAS, are you running the correct company. I have check CODEUNIT.RUN(55000) and CODEUNIT.RUN(CODEUNIT::“My Code unit”) and both work for me. Regards Graham

In fact the handhelds are working quite fine on both NAS and Navision client. I just get problems when calling the post functionality. All data requests are performed without any problems. Navigating through the forms is no problem, Navigating back is no problem, just the posting. In fact posting takes around 3 to 5 seconds when running on the client. When running on the handheld the message “Could not post document” is returned immediately.

Debugger and NAS (from Application Designer’s Guide): To activate the debugger from Navision Application Server, you include the debug parameter at start-up: EXAMPLE nas debug,startupparameter=”test”,servername=PC0123 If you deactivate the debugger, you cannot activate it again unless you terminate Navision Application Server and then start it up with the debug parameter. Note that to be able to activate the debugger, there must be a developer license file in the Navision Application Server installation folder. any Confirms, dialog.OPEN in your codeunit? These would throw errors in NAS.

Shouldn’t any errors being logged in the event log then ? Unfortunatly there is nothing in the event log I could use for debugging. Any way to set the Debug parameter when NAS is installed as service ? How to set breakpoints ?

OK, setting breakpoints is not a problem (I should have tried first and asked later [;)] I’m getting a “Break on Error”, but not the Error Message itself. Not in the event log and not in the terminal window of the application server (running via console).

Hi Thomas, I don’t know anything about the POS posting routine, but I have set up NAS to post regular sales orders. One problem that took me forever to figure out was that the sales order posting calls the credit check function. This function is located in a form which is not allowed to use in a NAS. So even though the function didn’t try to open any window, NAS failed because it just can’t handle FORMS. Just something to look at. Regards Daniel

Daniel, you are a genius. In fact the posting routine did call a function in a table. In this function I had a local variable of the type form declared. The form was not getting started because of a condition which is not met. Anyway even if the function does not run the form, the error was coming up. But I’m missing an error in the event log or in the terminal window when running from the commandline regarding this.