Friday, November 30, 2012

Error on load of queue form in CRM 2011

I was setting up a new dev environment. It was working perfectly and suddenly, I can’t create a new queue or modify the existing queues.
I was getting the following error message.
I had a look in the event viewer. It was showing a warning message as shown in the screen shot.
I could not figure out the problem. I tried to repair the CRM. This happened after I setup the email router.
So start looking what I did. I found out that I was using “User Specified” access credential for incoming profile. By default, it is not allowed if you are not using SSL (HTTPS). But there is workaround as explained on TECHNET. The article mentioned that I have to manually add registry key DisableSecureDecryptionKey with value 1.  That’s what I did and that was a problem. I created a key instead of creating a DWORD value. To make this work, it should be a “DWORD” not a “Key”.
The DisableSecureDecryptionKey entry should look like following screen.
I made the change and it worked like a charm….

Thursday, November 22, 2012

My experience with Microsoft Dynamics CRM 2011 Custom Code Validation Tool


Microsoft released the “Microsoft Dynamics CRM 2011 Custom Code Validation Tool”  in May 2012. The purpose of this tool is to detect the potentials issues in  HTML and JavaScript web resources when  CRM2011 starts supporting multiple browsers. 

The cross browser functionality was supposed to be released in Q2 2012 but, that did not happen. The next release of CRM2011 code name Polaris is coming out in December 2012. One of the many features included in Polaris is cross browser compatibility. This blog lists  “What’s included in Polaris?”.

After reading about Polaris, I decided to try “CRM 2011 Custom Code Validation Tool”. Here is the link to download the tool. Here are my findings. The results are mixed but you can make up your own mind.

The following screen shot displays the results from the tool. To check the results, the user has to scroll down the list of web resources one by one.


Issues found by the tool

I included some old and unsupported code in the libraries to test the tool. Here are some of the screen shots of potential issues found by the tool.



So far so good. Here is the screen shot of the JavaScript webresource with most issues.


The thing that shocked me the most is that this code is straight from the CRM SDK sample provided by Microsoft.

Issues ignored by the tool

I intentionally added some unsupported code to the JavaScript web resource. But the tool did not identify this code as potential issue.

Here is the screen shot of one such unsupported code. I am using code to attach the custom CSS on form onload.



This is very good to identify the potential issue. But I can’t say how reliable it is.

Anyway  don’t use any unsupported code intentionally.

Monday, November 5, 2012

List of Currencies in CRM2011

To create a new currency in CRM, we have an option to select currency type of “System” or “Custom” as shown in the screen shot.


If we choose “system” for currency type which is the default selection, we can select  currency code from a look up view as shown in the following screen shot.


The selection from the lookup will fill all the required fields (“currency name”, “currency precision”, “currency symbol”) for the currency. We have to manually provide the value for the “exchange rate” field.

Now if you want all the currencies in your system then you have to repeat this process hundred plus times.

I had a look around to find a list of currencies to import into the system instead of creating these record one by one.There is a URL in  currency lookup view with the view id. Here is the URL from my environment.


I looked into the database and found a saved query record with a name  “Currency List” with the viewid shown in the above URL. But the “Query API” field value of the record was showing “TransactionCurrency.RetrieveDotNetCurrencies”. It suggested me that this currency list is not stored in the database table. It may be residing in the database but I did not find it.

I used “Fiddler” and  internet “Developer tools”  and compile the list of currencies in the lookup view. The list is XML spread sheet 2003 format.  Here is the link to download the file. This file can be imported into the system using data import tool. Here is screen shot of some sample data from the file.


The “regionname” does not get stored in the currency record. You need to provide the exchange rate for the currencies against your base currency.

When you import this file into CRM map the fields of this file to the currency entity of the system. The mapping screen will look like this.


Import process will import 102 records and 62 records will fail. The reason for the failed records is duplicate currency code.

If you look into the currency list, there are a lot of duplicate currency codes. For example “CAD” currency code is repeated 4 times.


INR, EUR and some other currencies are repeated multiple time too.

Make the changes to the file as required and import it into CRM using built-in import tool.

I hope this helps.