There are situations where we need to enable/disable a control based on the users role.

I have written a code which is split into 2 sections :

First part of the code checks – the roles assigned to the user and returns the roles in a list

Second part of the code takes 2 parameters – First parameter is list from the above result, Second one is also a list which checks has the roles to be verified. This is needed to enable or disable a control.

I am not explaining the steps in trace parser installation in this post. Our focus will be on its usage and how it helps developer when there is a performance hit.

How to reach this tool in Ax?

By default, the parameters , “Xpp” and “BindingParameters” are disabled. You need to enable it.

Click “Start Trace” and specify a file name. . Execute the scenario which gives performance issue . Once done, “Stop Trace” and this will create a trace file .

Now click “Open Trace” button. In case you get any error in opening the file,

go to start and type Trace parser

You can import the trace file . Attach your session to investigate the scenario.

Call Tree tab shows the hierarchy of events happened. Long duration tasks are highlighted in red which helps the developer to analyse the code.

X++/RPC tab – You can sort it by exclusive and inclusive and find the calls taking most of the time. There is a call stack tab which shows the trace of the methods called.

SQL tab: It shows the db calls and it helps the developer to check the DB statements which consumes more time . It can give us the clue if any index is missing or an insert during the index causes the problem.

With this, we get basic idea on using Trace parser. I am briefing you about another tool from SQL side which is called “Activity monitor”.

This tool ,when used with Trace parser helps to fix the performance issue in the application. You should have administrator permission to trigger this tool.

Option 1

Option 2 : Shortcut icon

The column “Head Blocker” specifies if there is any process blocked during execution .We will also get to know the dependant process is affected by this block.

In order to kill the blocking process, right click and select the option “Kill”.

To dig more the details, click “Details” tab which gives a hint on the statements that are causing the block.

So Activity monitor and Trace parser go hand in hand to pull out the performance issue without investing more time in probing the issue.