Using Client Monitor to diagnose problems
Client Monitor is a tool that collects statistics about client/server communication. It will let you find out where your code is slow and show you every line of code that executes from start to finish. This recipe will show you how to use it.
How to do it...
Create a new codeunit from Object Designer.
Add the following global variable:
Name
Type
Subtype
Customer
Record
Customer
Add the following code to the
OnRun
trigger:Customer.FINDFIRST; SLEEP(5000); Customer.FINDLAST;
Save and close the codeunit.
From the Tools menu in the NAV client click on Client Monitor.
Click the Start button in the window that then appears.
Run the codeunit you created.
Click the Stop Button on the Client Monitor window.
You should now see a form similar to the following screenshot:
How it works...
It can be difficult to parse through all of the data that programs like this collect. We will not begin to cover everything that the Client Monitor reports on, but instead will...