Application Server Debugging
Rob_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??
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??
Rob Hansen
http://www.epimatic.com
http://www.epimatic.com
0
Comments
-
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
Peter0 -
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 world0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions