I came across something that was a bit weird in an implementation where every user in a Citrix deployed RoleTailored client suddenly connected to the TEST system instead of the LIVE system. I thought I’d share this gotcha to save others from making the same mistake.
When you start Dynamics NAV 2009’s RoleTailored client, there are a three ways for the client to determine which server to connect to. This is handy to know because most people want to have a live system and a test system shortcut on their desktop and it’s nice to know where you’re going when you start the client.
The first method is the default method where the system simply reads your settings from the ClientUserSettings.config file which you can find in
%ProgramData%\Microsoft\Microsoft Dynamics NAV\
That’s pretty easy because you don’t need to do anything. The file gets created automatically and if you connect to a different server, the new value gets saved in the file. Not very useful for switching between Live and Test though.
Startup .config file
This one’s pretty neat. When you start the client, you can add a command line parameter to specify the location of the config file you want to use. The parameter is settings and here’s an example of the shortcut you would need.
But this is where the gotcha comes in. If you use this settings file to start the client and then connect to a different server, the change gets written back to the config file. That’s not so good when you were trying to use different files to point you to either Live or Test systems. It’s even worse if you are using Citrix to publish the application and every user is updating the same config file. Whilst you don’t get errors, it can be a bit confusing if one user starts up the LIVE system and then jumps to the TEST server which writes the settings back to the config file so the next time a user tries to open the LIVE system they end up in TEST. One solution to this is to make the config files read-only, the other is to use the startup URI.
I quite like this option for a couple of reasons. First of all, it’s really obvious which system you’re connecting to. Secondly, if you’re connecting to a system that is not your default server (remember the ClientUserSettings.config file?) then the RTC puts up a helpful message telling you. This is great for having two shortcuts that will take you into live or test and it’s not going to mess with your ClientUserSettings.config file either.
The syntax for the URI allows you to specify which company you want to start in too. You could use this to start up on a specific page if you like.
The double quotes are needed if your company name contains spaces.
02-03-2012 11:08 p.m.