Thursday, August 21, 2008

Retrieving User Language Settings via Jscript in Dynamics CRM.

I had a client need to run some code based on what language the user interface was in. In this particular client's setup, there are users that use both French and English user interfaces. The import/export labels tool works well but there were some cases where we needed to show different data on a CRM form based the language.

Good news is that this is a super easy jscript call, you just need to look at the system variables listed below:

//determine language
alert(USER_LANGUAGE_CODE);
alert(ORG_LANGUAGE_CODE);

The code will tell you what language code the user is using, so for english it is 1033, and for french it is 1036. You will need at least one other language pack installed for this to make any sense. So using these values in a "if" statement will allow you to do what you need to do for that particular user's language.

Friday, August 8, 2008

SQL 2005 provisioning tool for Vista (oh yeah, and Windows 2008)

I think that I have setup SQL Server (6.5, 7.0, 2000 and 2005) about a thousand times.

Asides from a few minor things here and there, this install works really well and usually there isn't a problem.

Today I installed on Windows 2008, and after a few setup things as outlined in http://support.microsoft.com/kb/920201 the install worked perfectly. I then install SQL 2005 SP2 and was prompted for the SQL 2005 Provisioning Tool for Vista users at the end. I thought, this particular customer are all using Windows XP and besides that, they will not be accessing SQL directly, on through CRM, so I opted out of that.

So, when I tried to log into SQL Management Studio to verify everything was A-OK, I was surprised to see that I was not allowed to login. I was logged in with a domain administrator, and I cannot log in? I couldn't even use 'sa' because I installed windows authenticated mode as opposed to mixed.

After some digging around, I realized that Windows 2008, is, in its own way "Vista Server" so by not running the provisioning tool, I ended up locking myself out of SQL Server. Running that that tool got me in, hopefully this note will save some folks a lot of headaches!

Wednesday, August 6, 2008

CRM Consultants Toolbox - Virtual Machines

Virtual machines are becoming more and more popular these days. I first ran into this about 8 years ago when a client suggested that we do a Great Plains test upgrade on a vmware machine. I was really skeptical when they explained the concept. I figured with SQL 7, windows NT server running in a machine that was already running windows NT workstation have disaster written all over it. They client had a dual processor machine with a full gig of RAM (that was a lot in those days) and the sample upgrade worked great.

Today I use VMWare Server for development and Virtual PC for demos. I use VPC because everything Microsoft puts out in terms of demo and training images is on VPC and it works great. VMWare server is free and has a good console and from my perspective, and it allows me to have a bunch of test machines running all the time.

A few of my customers are also using VMWare ESX to consolidate servers. Microsoft now supports virtual environments for Microsoft Dynamics CRM.

I haven't yet used Microsoft Virtual Server, so I cannot really comment at this point.


Another thing that I have started to use Virtual machines for is to setup a dedicated client for VPN setups.


Like most consultants, I have more than one customer (which may come as a dissappointment to some of my customers!) and because I work both locally and on international projects, I have a number of remote systems that I need to connect to. If you have ever attempted to install more than one VPN client on a single machine, most time you will realize that they do not play nice together. For example, installing a Cisco VPN on a machine that already has a Stonegate VPN installed generally will cause chaos for one or both VPN setups. Usually this is not an issue for most people as they only need the one to connect to the office.

However, I ran into this the other day and had to spend time uninstalling and reinstalling VPN setups, which takes time and also sometimes requires administrators to generate new keys, etc.

To get around this, I used VPC and setup a clean version of Windows XP for each VPN config I need. This will allow me to have multiple VPN setups without having to conflict with each other. You can even take this a step further and add these VMs to the customers domain for support and troubleshooting, without having to switch domains and screwing up your own setup.