Client Access Log (Dynamics AX 2012)

Keeping track of multiple users’ activities as they do their work in the system is of great benefit when we run into problem areas where there is no information provided as to the cause of the crash. Having this type of tracing included would allow us to turn on tracing for all users or a subset of users over a long period of time to try and help narrow in on problem areas which can then be investigated in greater detail.

In Dynamics AX 2012, the administrator can choose to enable client access log at the user level and the user actions (like form open, close) will be recorded in a new table called SysClientAccessLog.  The control field to enable or disable this feature is added to UserInfo table.   This feature is compiled only for rich client and by default is turned off.

How to enable Client Access log?

There are two log levels that can be enabled in the UserInfo Table.

a) High Level. Value of 1

b) Detailed Level. Value of 2

The logging can be turned on per user.

update USERINFO set CLIENTACCESSLOGLEVEL = 1 where id = '<axuserid>'


update USERINFO set CLIENTACCESSLOGLEVEL = 2 where id = '<axuserid>'

After running the above SQL statement in AX database, the user (<axuserid>) will have to restart his/her AX Client for the logging to start.

What is logged for each level?

High Level:

· Form open and close. 

· Form part open and close.

At this level, we get an entry for each form/form part open and close.

Detailed Level:

· Esc pressed

· Abort

· Print

· Print Preview

· Next Record

· Previous Record

· End record

· Select all

· Sort Ascend

· Sort Descend

· Refresh

In addition to form, event, time, computer name, the duration (elapsed time) is logged in milliseconds for each event.

How often is it flushed to database?

Every AX client that has logging enabled will hold the logs in memory until a threshold (not-configurable, stands at 60 now) is reached. After the threshold, the logs are flushed into AX database. One record is inserted into SysClientAccessLog for each flush. The flush also happens when the AX Client is closed.

How to view the user activity?

Each record in SysClientAccessLog contains Session ID, Client Computer, CreatedDateTime and an Events container. Events container is a container of containers of (form Name, Event Name, and duration in milliseconds, company and the timestamp when the event occurred).

Sample form to view user activity Download

Disclaimer: The project in the above xpo is provided "AS IS" with no warranties, and confers no rights.

Please import the xpo from the above link.

Open AOT and navigate to Forms\ClientAccessLogListPage and open the form.

First time you run the form, the grid would be empty. You need to click on “Check for More Logs” button in ClientAccessLog tab.


There are two more buttons:

a) Delete-ClientAccessLogFlat: This deletes all the rows from the expanded user table(ClientAccessLogFlat)

b) Delete-SysClientAccessLog: This button deletes all the rows from kernel table (SysClientAccessLog). When you do this action, you lose all the logs.

You will be able to sort/filter on any of the columns.

Sample view of the form:


(If the AosId shows up as blank, we couldn’t fetch the AosID based on the information in the SysClientAccessLog table.)

You can filter the grid based on start log time and end log time. Additionally you can filter by grid (Ctrl + G) or use advance filter (Ctrl + F3).  Refer to AX 2012 help for filtering if needed.

Comments (5)
  1. Adam says:


    That's very useful feature, however it logs only those users' activity, who belong to system administrator role, which makes it useless, I'm afraid.



  2. AXTech says:

    Why is AX 2012 R2 CU6 still logging form open and close events when all users have CLIENTACCESSLOGLEVEL = 0? And AOS's are restarted?

  3. You need to do the following to enable the logging for all users:

    1. Open the AOT
    2. In the AOT go to Security > Roles

    3. Locate the SystemUser role

    4. Expand SystemUser role and then expand the Permissions node

    5. Within the permissions, right click on the Tables node and choose New Table

    6. You should now see a NewTable object created beneath 'Tables'

    7. Right click on the NewTable and choose properties

    8. In the properties window set the 'Table' property to SysClientAccessLog

    9. In the properties window set the Effective access to Create

    10. At the top of the AOT window click the Save all button to save your changes to the System User role

    Once this is completed, users would have to logout and back in for the change to take effect, but this should give all users within the System User role access to insert to the SysClientAccessLog table.



  4. Abdul says:

    When I import the package I get the below error and import failed. Any help?

    Illegal data conversion from original field RLCPOMARKUPTRANS.CUSTVENDPOSTED_RU to CLIENTACCESSLOGFLAT.SessionId: Unable to convert string data types to anything but INT, or REAL field types (1).

    Synchronize database Cannot execute the required database operation.

    The SQL database has issued an error.

    Thanks in advance

  5. Andrew says:

    It does not look like this log will provide information regarding if a record was changed.  I.e. it looks like it will show if the admin user opens up the customer form or closes out of it, but will not show if they changed the credit limit information.  Would this be covered by database logging?

Comments are closed.

Skip to main content