CRM 4 – The plugin registration tool won’t build

I have been using CRM 2011 for the past year and I now suddenly have a project which uses CRM 4 and it is very strange going back to CRM 4.

Even trying to build the plugin registration tool was totally different.

I tried adding the dll’s which is what you usually do in CRM 2011 but this didn’t work and it was complaining with this

The type or namespace name ‘CrmSdk’ could not be found

this was because you have to add web references rather than dll’s

Installation Instructions

  1. Double-click the PluginRegistrationTool.sln file to open the solution in Visual Studio 2008.
  2. In Solution Explorer, right-click References and select Add Web Reference.
  3. Add a Web reference to the Visual Studio project named CrmSdk that refers to your Microsoft Dynamics CRM 4.0 server’s CrmService Web service. An example URL is http://localhost/mscrmservices/2007/CrmServiceWsdl.aspx.
  4. Add a Web reference named CrmSdk.Discovery that refers to your Microsoft Dynamics CRM 4.0 server’s CrmDiscoveryService Web service. An example is http://localhost/mscrmservices/2007/AD/CrmDiscoveryService.asmx.
  5. Add a Web reference named MetadataServiceSdk that refers to your Microsoft Dynamics CRM 4.0 server’s MetadataService Web service. An example is http://localhost/mscrmservices/2007/MetadataService.asmx.
  6. Compile the project by clicking Build Solution in the Build menu.
I also had to change the project from .NET 2 to .NET 3.5 and above.

CRM 2011 – Outlook ribbon has gone after CRM 2011 upgrade

Recently Metaphorix has upgraded it’s CRM version from CRM 4 to CRM 2011, I should I upgraded the versions.

I found that some people who had been using older versions of outlook would find they had no Ribbon after the outlook CRM upgrade.

The reason for this was a registry setting which isn’t deleted.  To solve the problem I had to go into the registry and delete a folder called 2.4 and then it worked.

Luckily this is a known problem and Microsoft have a KB article with instructions

To resolve this problem, follow these steps:

  1. Exit Outlook.
  2. Click Start, click Run, type regedit, and then click OK.
  3. Locate the following registry subkey:
  4. Right-click the 2.4 registry key, and then select Export. Save the export to your desktop to create a backup.
  5. Right-click the 2.4 key again, and then select delete.
  6. Start Outlook.

CRM 2011 – N:N relationships and advanced finds quirks

I was trying to set up a new entity and link it to a contact.

The example in this case was they wanted to have a Language Entity which they could add languages to a contact.  They would then want to search for contacts which had certain languages.

I set up my new language entity put a drop down on it with 5 languages to test with.

I initially created it as a 1:N relationship but this meant every language linked to a contact was a completely new language entity.  so you could have English for contact a and then a new language entity called English for contact b.  When you did an advanced search the two different values would appear.

So I went back and changed the relationship to N:N.

When you create an N:N relationship you get these choices below.  The display options are a bit unusual, do not display?

Although these options seem harmless the display option has big ramifications.  Luckily the CRM Guru Richard Knudson wrote a detailed blog about this which gave me the answer, which you can read here


Initially I chose to display the link on one side of the relationship, on the contact.  This caused advanced searches when searching a contact with languages of English to return no results.  Why?

The reason is if you do not display the relationship on both entities it won’t return any results in an advanced find!!!

Richard Knudson sums this up perfectly

Interestingly, it also turns out that if you select Do not Display in the relationship properties, you will not be able to create an Advanced Find query between two record types related with an N:N. So the Do not Display option apparently means “do not display in Advanced Find”, as well as “do not display on the form”.


Below I changed the display options this returned no rows, which perplexed me.


Another interesting point from the picture above is when you select multiple drop down values it selects those as an or, so I had to add another select to create the AND value I wanted.

Finally someone else in the office was saying this didn’t work in CRM 4 and I think this article from Richard Knudson again backs that up, saying there was something not quite right with N:N relationships and CRM 4

once again thanks to the mighty Knud for that.

So there we go, once again CRM can act in unusual ways, which shows that experience using CRM is invaluable because the only way you  learn all these quirks is by trying things.



CRM 2011 – CRM in outlook is greyed out

[tweetmeme source=”BenHosk” only_single=false]

I had someone call me today saying they were working from home and when they opened outlook the CRM parts of it were greyed out.  It seemed that CRM was unavailable.


I did first check the user hadn’t had their CRM roles removed, which might explain why they couldn’t view anything, although it didn’t make sense fully because I thought CRM would still load up.

They had internet access and their VPN said they were connected.

Firstly I asked them to access CRM using internet explorer, this didn’t work.

I told them to disconnect and then connect the VPN again because it seemed to me they could access the internet but they couldn’t see the CRM server, which basically sounded like they were not connected to the company network.

After the restart of the VPN and a restart of outlook CRM was up and running again.

CRM 2011 – repair install failed half way through

[tweetmeme source=”BenHosk” only_single=false]

if you read my previous blog post you will have seen that I finished the story by saying it had fixed everything.  Well real life installing, uninstalling and configuring Microsoft CRM 2011 is rarely that straight forward.

I ended up with another error I had never seen and left me scratching my head

I have these parts which I copied into google

StopWebApplicationPoolAction failed


the service has not been started. (Exception from HRESULT:

What happened was half way through the reinstall/repair it fell over because it couldn’t stop one of the Web application pools.

I looked at the application pools in IIS and found this puzzling because they were already stopped.  I tried stopping the CRM website, other app pools (quickly so the other apps wouldn’t know!!!)

nothing fixed it.

I then started the application pools and then pressed retry and the repair continued and finished with no problems!!

This time I really am up and running and everything is fixed


CRM 2011 – CRM has stopped dead – Business Management Error: The user ID associated with the current user is not valid

[tweetmeme source=”BenHosk” only_single=false]

I had a heart stopping moment today when I tried to log into CRM 2011 I gave me a weird error message below

Business Management Error: The user ID associated with the current user is not valid

This was a completely new error to me.  I started doing some digging and found the CRM async services were not running (always check this first)

Usually you can restart these services and everything goes back to normal but when I tried to restart the services it complained the user couldn’t logon.

This was very unusual.

I then tried to remote desktop to the server using that user and it wouldn’t connect.  The user I was having problems was the user you specify to run all the web services and services in general for CRM.  This user isn’t usually a user in CRM and you can change this to NETWORK SERVICE but that is not very secure.

This was all rather odd but in the end an IT chap looking after the server changed the password for the user.  After changing this I could then remote desktop to the computer, so I assume changing and saving the user possibly refreshed something.

Then you have the problem of how do you set the new password for this user.  The way I did it was to go to the control panel, ADD REMOVE programs and then choose Microsoft CRM 2011 server and do a repair.

You then get to fill in the details for this user.  You also get the added bonus of the program verifying the details are correct.

One word of warning, you will need to have the CRM install exe handy (I usually leave this on the server, in a folder off the c drive)

you should also not remote desktop to the CRM server using that user because he probably won’t have privileges to access the SQL server or the Active Directory account.  AGHGHGHGHG I slide down the snake and have to login and go through all that again.

Still it sorted out the problem

CRM 2011 Tools – SiteMap Editor and Ribbon Editor

[tweetmeme source=”BenHosk” only_single=false]

I have two excellent CRM 2011 tools to recommend today, they will save yosu a lot of time and make configuring the SiteMap and the Ribbon much easier.

Editing the sitemap is quite a time consuming task because you have to export the sitemap, makes changes to the xml files and then import the changes. Any syntax errors will cause the SiteMap not import correctly and then if you don’t like the changes or you have done it wrong then you have to go through the export/change/import procedure all over again.

Thankfully with this excellent tool editing the SiteMap is alot easier, you can load the SiteMap into the editor, make the changes and then export them back.

You can get the SiteMap editor on codeplex here. Also the writer of this tool has written many CRM tools and is well respected in the CRM community. His name Tanguy and you should look at his blog.

The project describes the SiteMap editor like this

Project Description
SiteMap Editor for Microsoft Dynamics CRM 2011 helps developer and customizers to configure the Site Map in a graphical way.

You’ll no longer have to create solution, add component, export, update Xml and reimport the solution to update the SiteMap.

There is also the Ribbon editor which can be used to edit the Ribbon using a graphical tool rather than hand editing XML files again. You can download the tool here

Here is the project description

Project Description
Ribbon Editor makes it easier for developers and customizers to edit Microsoft Dynamics CRM 2011 ribbons.

You’ll no longer have to know by heart all ribbon capabilities to customize it.

You still have to understand how a ribbon work. This application is not a wizard, it is really an editor. There is no consistency checks until you try to import back the ribbon.

This project is currently in Alpha version, it has still many bugs but I can’t identify all by myself. Please create discussion for feature request or issue for any bug found.