Customization and programming tricks by Ronny Van der Snickt

Extra options in optionset after import

After importing the product entity into a new organization I noticed something weird.

In my development environment I deleted all the options of the product type options set and created 2 new ones.

I exported this entity (unmanaged) and imported this in another clean organization.

The end result was that the product type had 6 options. The 4 default options and my 2 new once.

Which is kind of strange because I thought options get replaced when you import a solution. In this case the options merged.

I tried to reimport the same solution in the same organization again. Now I had only 2 options sets left.

So importing the same solution 2 times gives you different options sets. So again something extra to check when importing/exporting organizations…

MS CRM 4.0 Setup error: ASP.NET is not installed

Today I got an error when installing MS CRM 4.0. Internet Information Services (IIS) => ASP.NET is not installed. (The screenshot is in Dutch but I tried the English installation too with the same results).

Screenshot setup ms crm 4.0

The log file didn’t helped much either Read more »

My biggest SQL transaction ever.

I just performed my biggest SQL transaction ever.

I had to delete 100 million DuplicateRecordBase records in de CRM database (More info)

 select count(*) from DuplicateRecordBase


I used the following SQL because using the delete statement filled up the hard disk and would have taken ages.

truncate table DuplicateRecordBase

Show subordinate records after merging accounts

First create an IFrame on your form, this will contain the associated view. In my case I’m using the account entity.
Read more »

E-mail Router service failes to start after rollup 5

After installing Microsoft CRM Rollup 5 (incl. reboot) the email router service failed to start. In the event log the following error appeared: The E-mail Router service could not run the service main background thread.
Read more »

Speed up development with external JavaScript files

When creating complicated JavaScript for MS CRM it can be easier to place your code in an external JavaScript file while developing. This content of this file will be loaded and executed in the onload event of the form.
Read more »

Unshare accounts in MS CRM

After a company worked for several months with MS CRM, they decided to change security. They didn’t wanted user to be able to share accounts anymore. So far no problem but they wanted to remove all shares made by users.

There is no easy way of doing this, They have +60k accounts and 100 users and it’s impossible to check them all manually. So I had to make a program to unshared the records. My first problem was that it’s not possible to view the shares of a record (Correct me if I’m wrong) through the MS CRM Web Service. I could start and try to unshared all users for all records but that would require over 6.000.000 transactions.

So I looked at the database and tried to find a way to retrieve the share information (This is of course unsupported but my only intention here is to retrieve data from the database.) Read more »