Options

Application Server Debugging

Rob_HansenRob_Hansen Member Posts: 296
Greetings -

I'll try to explain this clearly...hopefully it makes sense!

For a client, we are using the Application Server to trigger a codeunit on startup. The codeunit has a Timer event, which polls a "Scheduled Event" table for any activities that are due to run (i.e. Next Run Date/Time < current date/time). For those activities, it triggers a specified codeunit. For example, we have a codeunit that runs an export of data to another system, so that is set up as a scheduled event.

For a few such scheduled codeunits, the result returns "SUCCEEDED" (we fill that result in on the Scheduled Event record using the result from "IF CODEUNIT.RUN(#) THEN..."). For one codeunit, however, the result always fails when the application server triggers it. This only happens when the application server triggers the codeunit - when an actual navision client is opened up (and logged in under the same windows login used for the application server) and the codeunit is run manually, it works fine.

My challenge is how to determine the cause of the failure. Using "IF CODEUNIT.RUN THEN..." traps for any error, so I don't have a way to see what it was. If I change this to just RUN the codeunit with no IF trapping, how can I see what the error is when the application server has no user interface? If I take that approach, would the actual error get logged in the Event Viewer or someplace??

Comments

  • Options
    pdjpdj Member Posts: 643
    I’m amassed you have been able to make any use of the NAS without making extensive use of the event viewer! :-) All ERROR, MESSAGE, TESTFIELD, FIELDERROR and run-time errors are logged in there. You can also start the NAS/NASSQL.exe directly in the command prompt. Then nothing is logged in the event log. Instead it’s written in the cmd box, which is easier to monitor then pressing F5 all the time in the event viewer.
    Regards
    Peter
  • Options
    ronvdwronvdw Member Posts: 16
    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 ternminate Navision Application Server and start it up with the debug parameter.
    Connectivity Studio for Microsoft Dynamics NAV - Where Microsoft Dynamics NAV meets the world
Sign In or Register to comment.