Dynamics AX – design and code

user cache

There are two types of caches for a user. Values and settings are saved in SysLastValue table. Code and labels are saved in auc and kti files in the %USERPROFILE%\AppData\Local\ folder which can be located on each server or in a server share if a server farm is used with roaming.

If you want to make sure there is no old cache disturbing when code is upgraded you can clear these two. If the users have made a lot of changes in forms they might get a bit upset losing it all but sometimes it really is a must.

By using PowerShell you could script to clear all of this. While shipping code and services are down, send a SQL command Delete from SysLastValue and then for each user, iterating the user table in AX, go to the %USERPROFILE%\AppData\Local\ folder, or just C:\Users\CurrentUser\AppData\Local folder if you find it easier and know that is the path used, and delete all ax*.auc and ax*.kti files.