Merry Christmas!


Thanks for reading this blog another year long. Now its time for me to stop working this year. We just won a nice new project, the MS CRM Outlook V3C has just been released and so it is time to start a great holiday. I'll spend a lot of time with my friends, family and above all my wonderfull girlfriend.

I wish you all a very good time around both christmas and new year. I hope you can all enjoy the time with your relatives and hope to see you next year again!


Filter data in a CRM lookup field

Curt Spanburgh posted this message on the Sandbox: Custom Lookup Dialog for Microsoft Dynamics CRM 3.

In this post he describes that it is possible to filter the data in a lookup box. He also gives an example which uses data on the form to filter the lookup data. For testing purposes I have used the code below. It should be placed in the form onload of the account entity. It does filter the lookup parent account and will only show accounts which do have a parent account already. Not necessarily useful in a business case, but it does give you a clear example.

crmForm.all.parentaccountid.lookupbrowse = 1;
crmForm.all.parentaccountid.additionalparams = "fetchXml=<fetch mapping='logical'><entity name='account'><all-attributes/><order attribute='name' descending='false'/><filter type='and'><condition attribute='parentaccountid' operator='not-null'/></filter></entity></fetch>";
crmForm.all.parentaccountid.additionalparams += "&selObjects=1&findValue=0";

As you can see, some extra values are sent to the additionalparams attribute. These are selObjects and findValue. The selObjects should be set to the enity id of the lookup its entity.

To help you create fetchXml queries look here: Using Advanced Find for FetchXml

Great tip Curt!

Update: This does not work in CRM 4.0. Instead, look at the add-on as developed by Stunnware:

Developing on multiple VPC's

Hi guys,

I'm wondering what technologies you're using for developing CRM projects. Especially when you have multiple clients..

Personally I use virtual machines via Virtual PC. Each PC is about 10 gb huge though. So I was looking around on the internet and I found a good solution to that. Now this is what I do:

- Create one VPC which has Windows Server 2003, MSSQL, CRM, Sharepoint, Office, Visual Studio etc
- Shutdown that VPC and mark the harddisk file as read only
- Create a new VPC based on that harddisk with a check set at 'Enable undo disk' (and RAM adjusted to something like 1400 mb)
- Modify CRM to meet the customer needs
- Shutdown the VPC by using 'Save State and Save Changes'
- Make sure that 'Commit changes to the virtual harddisk' is UNCHECKED
- Select 'OK'

By doing so, you would only need 1 huge VPC and the rest are small files of about 500 mb till 2 gb. That saves me sooo much space and time! If somebody asks me a question and I dont have crm at hand, then just create a new vpc, start it (that takes a while though), run the test and remove the undo disk. Done!

You can use the Public demo VPC by Microsoft, but keep in mind that there are modifications made to that VPC which you should undo first.

Hope this helps you as well!


Set a default entity on a lookup window

In case you have more entities to chose from on a lookup window, then you might want to be able to set the default for this lookup. For instance, the regarding field on an activity entity like letter, email and fax does support multiple entities. If you want this to default set to contact, then use this javascript on the form onload:

//set default
crmForm.all.regardingobjectid.defaulttype = "2";

Even better, what if you dont want your user to be able to choose any entity and force them to use the contact entity? Then use this script:

//set only contact
crmForm.all.regardingobjectid.lookuptypes = "2";

//set icon
crmForm.all.regardingobjectid.lookuptypeIcons = "/_imgs/ico_16_2.gif";

Dont forget to set the icon. The icon will be displayed in front of the selected name after a selection in the lookup box has been made.

For a custom entity, then mind that the icon does not work that easily. Use this script for custom entities:

//set only contact
crmForm.all.regardingobjectid.lookuptypes = "10003";

//set icon
crmForm.all.regardingobjectid.lookuptypeIcons = "/_imgs/icon.aspx?objectTypeCode=10003&iconType=GridIcon&inProduction=1&cache=1";

Good luck!

Maximum amount of records in Excel export

I'm very busy at the moment (just like you all probably), so just a small post. The default for the Excel export is a maximum of 10.000 records. If you need to export more, then you'd need to modify a registery setting. Follow the next steps to achieve this:

- Start Regedit
- Navigate to HKLMachine\Software\Microsoft\MSCRM
- Create a new DWORD value named 'maxrecordsforexporttoexcel'
- Give the new value any value (minimum is 500)


Clear BizTalk Messagebox

Since the release of the CRM - BizTalk connector, you're all doing integrations right? Did it happen to you that you start a BizTalk application one evening and in the morning your messagebox is filled with more then 100.000 instances? If that is the case, then you can delete these by using the BizTalk Administration console. Unfortunately this will take hours and hours..

Instead, running this code on the BizTalk databases solves the issue for you:

DELETE FROM BizTalkMsgBoxDb.Instances
DELETE FROM BizTalkMsgBoxDb.InstancesSuspended

Keep in mind that you should only do this on development, test and acceptation, NEVER on production.

Reporting services on another machine

The database server doesn't have to be running on the same server as the CRM application itself. If you follow the installation guide, then everything should work fine. But... Avanade has done this for several clients and sometimes it appears that the reporting might not work. The error message will be:

“An error has occurred. For more information, contact your system administrator”
"error 401 – Unauthorized access"

If this is the case in your situation as well, then take a look at the following steps.

First you have to enable Kerberos Authentication for IIS on the CRM Server.
- Open a DOS box and browse to c:\inetpub\adminscripts
- Run the command: cscript adsutil.vbs set w3svc/1/NTAuthenticationProviders "Negotiate,NTLM" (If only one website is running you can use 1 in the commandline. Otherwise you have to check the logfile directory to see what number you should use)

If your services run with the "network service" account you have to open ADSIEDIT and open the propeties of the CRM server. Go to SPN settings and add the next lines:
(Computername is your CRM server and FQDN is your Fully Qualified Domain Name)


You have to do a similar action on the SQL Server, the default instance uses port 1433

Finally, on the client computer check if in Internet Explorer "Integrated Windows Authentication" is activated (under the advanced settings of the internet options)

Hope this helps you to get reporting to work as well!

Microsoft CRM for Enterprise Organizations

Microsoft started putting Microsoft CRM into the market as an application for Small and Medium sized businesses. This didn't stop us from Avanade and also other partners to use this application in larger and even enterprise businesses. With the release of Microsoft CRM 3.0, the application is really Enterprise ready.

Avanade is the trusted advisor that customers depend on to deliver a successful implementation. Our team of experts has deployed Microsoft’s CRM solutions in the enterprise more than anyone else in the industry. Based on the experiences we have gathered, reports and whitepapers are being published on our websites and Here are some interesting articles:

Realizing the Vision of CRM with the Avanade® Federated Architecture
A report which shows the Avanade Federated Architecture. Federated architecture allows companies to deploy more than one instance of CRM, while ensuring that critical data remains in-synch and up-to-date across the entire organization. With synchronization across multiple CRM instances, collaboration is possible across regions and divisions, while individual groups can maintain their independence and optimize operations where necessary.

Avanade Enterprise CRM
At Avanade, we believe CRM is a holistic approach to improving customer acquisition, retention, and profitability. Simply put, it’s connecting the Right Customer, with the Right Information, at the Right Time across the Enterprise. This document describes the Avanade's Enterprise CRM offerings.

Scaling Microsoft® Dynamics™ CRM
Avanade has developed a whitepaper as well and it describes the Scalability and Performance Testing and Tuning Results for the enterprise.This white paper summarizes the scaling characteristics of Microsoft Dynamics CRM 3.0 with a medium to heavy sales force automation transaction load supporting 3,000 concurrent users. Avanade initiated performance testing in 2006 at our technology infrastructure lab in Seattle, Washington.

Our public references include:
- O.C. Tanner
- ABN Amro
- BGE Home
- Sara Lee
- Bouwfonds

If you'd like more information on how Avanade can leverage CRM in Enterprise organizations, feel free to contact me or Anthone Withers, Avanade global CRM Solutions Director, at

Using the Advanced Find for FetchXML builder

Some time ago I talked about the program "FetchXML builder" to build FetchXML queries:, but take a look at the next solution.

You can just open the Advanced find page and build the query as you like. Then run the query to see if it returns the data as you wish it should. If you are satisfied with the results and you want to know what query was sent into the CRM Framework, then press F11 to get the address bar and enter this script and press enter.


If you get a warning about leaving the page, just press 'ok' and then the query which is sent to the framework opens up in a popup. Unfortunately you cannot select the text to copy and paste. But with Windows XP and Windows Server 2003 you can copy all text on the popup by clicking somewhere on the popup (not on the button "OK" ofcourse) and pressing ctrl+c. Now in notepad you can paste the text of the FetchXML.

Good luck!

Update: Thanks to Piotr in the comment section I have learned the javascript prompt command. Try this instead of the alert:

javascript:prompt("my query:", resultRender.FetchXml.value);

Error: Deletion Service failed to clean up some tables

Some people have been experiencing the following error message in the event log:

Event Type: Error
Event Source: MSCRMDeletionService
Event Category: None
Event ID: 16387
Date: Date
Time: Time
AM User: N/A
Computer: Computer_Name
Error: Deletion Service failed to clean up some tables.

Microsoft has a solution for this message. See for their solution.

Personally I don't feel comfortable with the solution they give. They are removing the enforced relationships for the tables which cause the issue. This will leave you with orphaned records in your database and probably the same issue when you upgrade to the upcoming titan release. Here are my steps to correctly fix this issue (partly copied from the MS solution) :

To identify the table where the Deletion Service is failing, follow these steps:
1. On the Microsoft Dynamics CRM server, click Start, click Run, type cmd, and then click OK.
2. At the command prompt, locate the system drive, locate the program files, locate Microsoft Dynamics CRM, locate the server, locate the bin, type crmdeletionservice.exe –runonce, and then press ENTER. You then receive a message that resembles the following message:
Can't clean up the following tables: Campaign

Note The table that is returned in the message is the table for which the Deletion Service failed.

The following example demonstrates how to resolve this problem for the Campaign table.

To resolve the problem for the Campaign table, follow these steps:
1. Run a statement in Microsoft SQL Query Analyzer. To do this, follow these steps:
a. Click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
b. Run the following query against the Organization Name_MSCRM database.
delete from Campaign where DeletionStateCode = 2
This query returns a message that resembles the following message:

DELETE statement conflicted with COLUMN REFERENCE constraint 'campaign_leads'.

2. Run two queries agains the Organization Name_MSCRM database.
delete from [table name in message] where [column name in message] in (select campaignid from Campaign where DeletionStateCode = 2)

delete from Campaign where DeletionStateCode = 2

By doing this, you do delete the associated records as well. Keep in mind that once deleted, you cannot get the data back. Therefore always make a backup first!

MSCRM Mobile Applications

Microsoft does offer 2 different applications for the mobile devices. These are the Microsoft Dynamics CRM 3.0 Mobile client (in short the CRM Mobile client) and the CRM Mobile Express for Microsoft Dynamics CRM 3.0 (Mobile Express client). Next to these two applications there is the CWR Mobility's Mobile CRM client (CWR Mobile client). Now which application to use?

Lets look at the descriptions for each client:

Microsoft Dynamics CRM 3.0 Mobile application
Microsoft CRM Mobile provides salespeople with up-to-date information about their accounts and contacts, and helps them manage sales opportunities and track sales-related activities.

Salespeople select the data to take with them on the road. While disconnected, they can enter data related to their sales activities. Salespeople can synchronize data with the Microsoft CRM server when the network is available, either when the user is on the office network, or when wireless access is available through CDMA or GPRS/Edge. The data entry forms and views can be customized for your business.

CRM Mobile Express for Microsoft Dynamics CRM 3.0
CRM Mobile Express for Microsoft Dynamics CRM 3.0 is a shared-source initiative sponsored by Microsoft that offers a lightweight, mobile browser client for viewing and editing data in Microsoft Dynamics CRM 3.0. Now you can manage important Sales, Service and Marketing information from your Windows Mobile, Smartphone and HTML 4.0 compatible devices! CRM Mobile Express for Microsoft CRM also includes a Microsoft Dynamics CRM 3.0 Administration Console that can be used to customize your mobile data objects - such as adding custom CRM entities to CRM Mobile Express, set data object read and write permissions, and configure mobile forms according to your CRM system's design. This community project comes complete with three documents - an Installation guide, a User guide and a Developer guide, as well as the application source code for both the CRM Mobile Express Client and Administration Console applications. Developers can use Visual 2005 to extend and modify both applications as they see fit.

CWR Mobile CRM by CWR Mobility
CWR Mobile CRM delivers:
- Access to Dynamics CRM 3.0 while out of the office – allowing for up-to-the-minute data changes (from the field and the office) and instant access to current data.
- A user-friendly interface on the Windows Mobile devices for intuitive CRM data access and entry by the mobile professional. Both while the device is connected online to a wireless service provider and offline, such as in an airplane, or deep inside a customer’s warehouse

Using CWR Mobility's Mobile CRM, sales and service teams have instant access to important customer information when and where they need it.

There are some factors which would influence the result on which application to use. These factors include:
- Out of the box functionality
- Extensibility
- Offline support
- Client Requirements
- Language support
- Price

Out of the box functionality
When comparing the functionality out of the box, then the CWR Mobile client gets the highest score. It supports all (custom) entities, (custom) attributes, a very efficient synchronisation mechanism, field level security via configuration and a lot of minor, but useful features like: direct calling the phonenumber on the screen and TomTom integration.

The Mobile Express client misses the paging functionality out of the box.

Both the Mobile Express client as well as the CWR Mobile client have good possibilities for extensions. The Mobile Express client is a shared source initiative which offers all the code which can be extended. The CWR application supports the addition of custom build controls and client side business logic. Of course these extensions should be developed by professional developers.

Offline support
The CWR Mobile client support Online as well as Offline modes (network aware). The CRM Mobile client supports only Offline mode with a manual sync. The Mobile Express client only supports Online mode.

Client requirements
The Mobile Express client only requires a HTML 4.0 compatible device. If Blackbarry support is required, then this is the only supported application.

The CRM Mobile client as well as the CWR Mobile client requires Windows Mobile or PocketPC. The CWR Mobile client requires a screen resolution of 240x240 and 48mb ram. The CRM Mobile client requires a screen resolution of 240x320 and 64mb ram.

Language support
The CWR Mobile application supports all supported Microsoft CRM languages. They also allow more languages to be added if required. The Mobile Express client supports all CRM languages and the CRM Mobile Client supports only the languages English, German, French and Spanisch.

The price depends on the cost of the product and the additional costs for customization by a partner. Here are listed the prices of the product. Prices of customization are variable.

The CRM Mobile client as well as the Mobile Express client are available for free. The current list price of the CWR Mobile client is €299 per mobile user.

Overall conclusion
By using a mobile application for MS CRM, you will be able to increase your sales. You are able to react very quickly to questions you get from customers and you can check the latest information just before you enter the clients room.

In the part above I have shown my experiences with these applications. In my point of view, the CWR Mobile application deliveres the best functionality. It supports everything that I expect a mobile application should support: network aware data access (online and offline), all languages, entities, custom entities and integration with many other applications on the client device. The price of the product is very reasonable and the quality you'll get for it is very good.

More Information
Microsoft Dynamics CRM 3.0 Mobile:

CRM Mobile Express for Microsoft Dynamics CRM 3.0:

CWR Mobility's Mobile CRM:

Enable or disable advanced find feature on attributes

Did you know that you can set each attribute of each entity to be able for advanced find or not?

By doing this you can specify which fields the users can search on. That means that all the fields which you do not use in your CRM system can be removed from the list to make using the advanced find easier.

So how do you do this? Just:
- go to system
- customizations
- customize entities
- select any entity
- go to the tab attributes
- select any attribute
- swich the flag 'Searchable'

Hm? You dont have that flag? Go get it at:

Good luck!

Accessing webservices via Javascript (aka AJAX)

Several times I've been asked, or saw the question on the newsgroups, how to create a piece of javascript code which retrieves data from a webservice. This information has been included in the SDK and you'll be able to find it here:

Here's the code example of that page:

// Declare variables.
var i=0; var j=0; var k=0; var r=0;
var serverUrl = "";

// This is the picklist.
switch (parseInt(event.srcElement.DataValue, 10))
case 1:
i = "JPY";
case 2:
i = "GBP";
case 3:
i = "EUR";

// Instantiate at connection to the Web service and call the get method.
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");"get", serverUrl + "/CurrencyConvertor.asmx/ConversionRate?FromCurrency=USD&ToCurrency="+escape(i), false);
var startTag = "<double xmlns=\"http://www.webserviceX.NET/\">";
var endTag = "</double>";
var exch;
var valueStart = 0;
var valueEnd = 0;

// Parse the returned XML string.
valueStart = xmlhttp.responseXML.xml.indexOf(startTag, valueEnd) + startTag.length;

valueEnd = xmlhttp.responseXml.xml.indexOf(endTag, valueEnd+1);
exch = xmlhttp.responseXML.xml.substring(valueStart, valueEnd);

// Set the Exchange rate on the custom attribute.
crmForm.all.fabrikam_exchangerate.DataValue = parseFloat (exch);
j = crmForm.all.totalamount.DataValue;
var kk = j*(parseFloat(exch));

// Calculate and set the total sum in the selected currency.
crmForm.all.fabrikam_totalcurrency.DataValue = kk;

Clone your production system: VMware Converter 3.0

Imagine you have a problem on your production server. You try to reproduce the error on your dev, test and acceptance servers and they all work fine... Now what? How do you solve this? I really don't like to debug errors on the production machine..

VMware has the solution! They have created a free Physical to Virtual Convertion tool which does not require your server to go offline! They're currently in beta test, but will release within approximately 6 months with the final version.

What Is VMware Converter?
VMware Converter is a highly robust and scalable enterprise-class migration tool that reduces the time that IT managers spend converting physical machines to VMware virtual machines. Using a snapshot based cloning mechanism that is extremely fast and reliable, VMware Converter enables remote conversions without disrupting the source server during the conversion process.

For more information:

If you can't wait until this product has been released, then you can work with VSMT, but you do need deep knowledge of AD, DNS etc.

The tool VSMT is developed by Microsoft and it works with Virtual Server and ADS. See this url for more information:

BizTalk Adapter available for download!

It's been some time waiting since the announcement at the Convergence in Texas for the BizTalk Adapter to be released, but it has gone public! Here are links to the adapter and a code sample:
The adapter
Code Sample

This BizTalk connector basically exposes all the CRM API's in BizTalk. For each entity schemas can be generated. The adapter can perform Create, Update, Delete or Execute actions based on the input.

I've been using the beta of this adapter for creating integrations with several other systems. Some integrations I have been working on already:
- Lead entry via email: POP3, BizTalk, MSCRM
- Continuous integration with financial system: Webservice, BizTalk, MSCRM
- Daily bulk import of data: SQL, BizTalk, MSCRM

Drop me a note if you'd like me to post a howto regarding this Adapter.

Have fun integrating CRM!

Determine which priviledges are required

I do assume that you do not provide the end user administrator rights on the crm installation. You probably have defined your own security role with the least priviledges the user should posess. Well how do you know what priviledges the user should posess?

There's an update to the online SDK with this information. You can browse to this url and you'll see a list of messages. Under each message the required priviledges are listed.

Now if you have a question like "Which priviledges are required for adding facilities to a resource group?" can be answered with a visit to that page.

FetchXML Builder

Some time ago Microsoft organized the code contest. Users have been asked to share their greatest assets with the community. One of the winners is James Downey. He has created the FetchXML Builder: a free user-friendly tool for building and testing FetchXML statements.

Today I have been able to use this tool in my development project. It works very intuitive, at least for people having fetchxml knowledge. I would recommend everybody to download the tool and use it to reduce the time needed for figuring out how to set up the xml. Go to the CRM Sandbox download page and scroll to "FetchXML Builder".

James, thanks for sharing!

Convergence EMEA 2006

March this year I didn't make it to the Convergence in Texas. But I'll be attending the Convergence in Munich (6-8 November)! Let me know if I can meet you there. I'll assist the MS teams at the Community Lounge and Microsoft “Ask The Expert” Pavillion.

What is Convergence 2006 EMEA?
Convergence EMEA is the Microsoft Dynamics premier event, to bring customers, partners, team members and industry experts together to share ideas and knowledge. At the first annual Convergence EMEA, customers will learn how to leverage their Microsoft investment now and in the future. In addition, they will gain a stronger sense of community through interacting with industry leaders, Microsoft team members, partners and other customers.

Who should attend Convergence 2006 EMEA?
All Microsoft Dynamics customers, including those that use:
Microsoft Dynamics AX (formerly Microsoft Business Solutions Axapta)
Microsoft Dynamics CRM (formerly Microsoft CRM)
Microsoft Dynamics GP (formerly Microsoft Business Solutions Great Plains)
Microsoft Dynamics NAV (formerly Microsoft Business Solutions Navision)

With specific roles as:
Business Decision Makers
Technical Decision Makers
IT Professionals
Information Workers

Existing Microsoft Dynamics PartnersMicrosoft Certified and Gold Certified partners, especially those with the Business Solutions competency and the IW competency.

For more information:

Reporting PreFilter

Right now I'm digging into reports more and more. I have encountered some troubles and here are some hands on experience tips.

Getting started
So... I want a report. What now?

First of all go to this url:
You'll find a tutorial here named "Create a report in 15 minutes or less". This is the place to start.

Then take a look at the Report Writers Guide for additional information regarding creating CRM Reports.

For information on how to make a report look like a crm report, look at the report style guide (pdf file in the sdk install file):

Finally take a look at how to deal with report performance.

If you want some more information on how to work with reporting services, take a look at the demo's "Introduction to SQL Server 2005 Reporting Services"

After following those links you should be able to create great reports!

Then the real fun starts. You encounter issues. Here are some catches to think about:
- Creating a prefilter. By adding an alias to a table named CRMAF_Filtered[entityname], you can use prefiltering. A select query like "SELECT name FROM FilteredAccount AS CRMAF_FilteredAccount" is enough. This works both for reports built in VS2003 as well as VS2005.
If this doesnt work, then check that the DataProvider isn't set to OLEDB or something else. This needs to be SQL.

<?xml version="1.0" encoding="utf-8"?>
<Report xmlns=" sqlserver/reporting/2003/10/reportdefinition" xmlns:rd=" SQLServer/reporting/reportdesigner">
<DataSource Name="CRMDEV30_MSCRM">
</DataSource Name="CRMDEV30_MSCRM">

- Showing the prefilter
Ok. Prefiltering works. Now we want to make the prefilter visible to the users. According to the Reporting Guide, you should add a parameter to the report with the name CRM_FilterText type string. Then you can add the value to a textbox using "Parameters!CRM_FilterText.Value". Indeed you can, but if the user selected about 10 pre filter options, then the list is unreadable. To solve this, you should add a line of code in which you replace the linefeed characters with carriagereturnlinefeed characters. Here's the code:

Public Shared Function Filter(ByVal strFilter As String) As String
Return (strFilter.Replace(vblf, vbCrLf))
End Function

Now you can add a value like this to your textbox:
= "Filter: " & vbCrLf & Code.Filter(Parameters!CRM_FilterText.Value)

- Printing landscape
The reports can be printed in landscape. Keep in mind this table:


When you want to print in landscape for European sized A4 papers, then fill in the corresponding values in the PageSize field of the report: 29,7cm;21cm. For an American letter use: 11in;8,5in. You can use cm or in just as you like.

Well. Thats about it for now.

If I encounter more tips I'll add them to this list. If you have hints to share, just comment and i'll update the post.

Stop using VS 2003 and start using VS 2005 for CRM Development

Most of the development for MS CRM v3.0 I do in Visual Studio 2003. This is because callouts needs to be built on .NET Framework v1.1. All the projects built with Visual Studio are .NET Framework v2.0. Since I dont want to switch between several IDE's all the time, I only use VS 2003.

Today is the day that I found a very interesting blog posting of Arash. See this post for information on how to build your callouts in VS 2005. So, read the post, download his MSI and get rid of Visual Studio 2003!



Earlier this week I removed the popups from this page, now I have added a useful functionality. If you know for sure that I wrote an article about something, then just search for the words you remember. The textbox on the right side will only search this blog.

So far about searching the blog. Now something about searching in CRM.

Do you know on which fields of the entity the quick search is searching on? Or have you ever wanted to make the search also search another field, but it didn't work? Then you must have missed this feature: Quick Find View.

If you go to the customization page of the entity you wish to change, then go to "Forms and views". There is a view called "Quick Find Active [entityname]". On this view there is an option to set the search fields. There you can see and change the fields on which the quick find is searching on.

No more popups!

At least, on this blog...

I've been using Nedstat for sitestatistics from the start of this blog. They have been taken-over by I didn't mind that much, but ever since there have been appearing popups on the blog. Now I'm running google analytics on the blog. They give a lot nicer reports and they do that without popups! Have fun with the improved user experience :)

See here a screenshot of the report of last week:

Optimize MS CRM webservice

Currently I'm working on an import program. I have to import thousands and thousands of records. Usually the crm system is quite fast, but with these huge loads, I'm getting quite anoyed by the performance of the MS CRM webservice. It even causes error messages like "The underlying connection was closed: Unable to connect to the remote server.".

Now there are some performance tweaks available. I wanted to write a post about it, but just before I found an article written by Aaron Elder. This is a must-read for people writing code to import bulk data. However, this page has been removed, but the same information is available at Bill's blog: Blog Move: Speed Racer - Call CRM at speeds that would impress even Trixie

Fetch all records

Have you ever tried to write a code which will get you all records from a specific entity? It's harder then you think it is! Everybody who is a bit aware of the CRM SDK thinks it should be a fetch statement like this:

<fetch mapping='logical'><entity name='account'><attribute name='accountid'/></entity>

This would only give you the first 5000 records in the database! It is written down in the SDK with small letters, but it could drive you crazy..

There are two solutions for this issue.
1) Add a registery setting to specify not to implement MaxRowsPerPage
2) Modify the fetch statement and merge several results

Here are the details for each solution
1st solution
Search in the SDK for the word "TurnOffFetchThrottling". You should add this as DWORD registery setting to HKLM\Software\Microsoft\MSCRM. Set the value to 1. You will now not have the 5000 records limit.

2nd solution
Modify your fetch statement to include paging and count numbers. Store all the data in an DataSet and perform that series of code over and over again as long as there is data coming.

Here's the script you should use to get all accountid's (for clarity and the ease of use I have added a function called "FetchDataSet").

private DataSet FetchAllAccountIds(){
int i=1;
bool bFinished = false;
DataSet dsAllData = new DataSet();
while (bFinished == false)
StringBuilder sbFetch = new StringBuilder();
sbFetch.AppendFormat("<fetch mapping='logical' page='{0}' count='5000'>", i);
sbFetch.Append("<entity name='account'>");
sbFetch.Append("<attribute name='accountid'/>");
sbFetch.Append("<attribute name='new_12_accountid'/>");
DataSet dsTempResult = FetchDataSet(sbFetch.ToString());
if (dsTempResult.Tables[0].Rows[0]["morerecords"].ToString() == "0")
bFinished = true;
return dsAllData;

private DataSet FetchDataSet(string fetchXml)
string strResult = service.Fetch(fetchXml);
DataSet ds = new DataSet();
System.IO.StringReader reader = new System.IO.StringReader(strResult);
return ds;

I hope this saves you some time!

Thanks to Andrew Krivosheyenko for the Regedit solution!

Save disabled fields


I was reading a posting of Ben Vollmer about "Doing Math in Microsoft CRM aka Calculated Field". This is an interesting article, but I noticed something in the posting that I did not know yet. There is a possibility to submit fields which are disabled! I have been using calculated fields before, but I always enabled the field when submitting the page.

So what is the solution? The use of the ForceSubmit attribute.
crmForm.all.field.ForceSubmit = true;

See the SDK for more info

MS CRM Live, open-source client for mobile devices and BizTalk integration

Today at the Worldwide Partner Conference 2006 in Boston, Microsoft has reveiled new information regarding CRM. Take a look at the press release for information regarding the the MS Dynamics CRM Live service, an open-source client for mobile devices and the BizTalk Server-based integration. Press release:

I'm looking forward to these products!

New MVP's

The new Dynamics MVP's are announced:

Great Plains
Duke DelPrado
Richard Whaley
Brenner Klenzman

Ronald Lemmen
Frank Lee

Ahmed Amini
Alain Krikilion

Toni Savage

Let's congratulate them all!!

And yes, I have noticed that my name is in that list as well :) Thanks Matt Parks for nominating!!

I've added my profile to the mvp website. Click here to find me

Fix alpahabet bar in Dutch CRM

The Dutch version of CRM has a nice bug. The alphabet bar looks like:
A B C D E F G H I K K L M N O P Q R S T U V W x Y Z

As you can see, there are two bugs. The first one is the double K and the second is the lowercase x. This has finally been fixed! They are still working on the kb article pages, but you can request the fix. The KB article is: 919358. In case you can read french or italian, look here: or The other languages will come slowly, but thats not that important. Just request the fix :)

Modifying the fullname

The fullname of a contact is always "firstname lastname". Right? Well, did you know that you can modify this? Go to Settings, System Settings. There you can modify this setting to some other options!

Great :) So lets modify the fullname to "lastname, firstname". When saving this setting, CRM warns you that this only works for the new entities and not for the existing entities. If this really is a problem, then you can go into SQL and update the fullname manually. Here's the code to update the contacttable:

UPDATE contactbase SET fullname = ISNULL(lastname, '') + ', ' + ISNULL(firstname, '')

Of course you can update the contactbase with other values for the fullname as well.

Keep in mind that you NEVER update the Contact view, always the contactbase. Updating the contact view will cause problems.

Anyway, you should always make a backup of your database before making any modification to the database.

CrmException: Exception of type Microsoft.Crm.CrmException was thrown

Time for a new fix for a common problem.

When uploading a report you might get an error message. If this error message is:

NullReferenceException: Object reference not set to an instance of an object.]Microsoft.Crm.Reporting.SRSReport.convertDataSource(CrmContext context) +115Microsoft.Crm.Reporting.SRSReport..ctor(String name, String description, String xmlContent, String showin, String relatedentity, String category, CrmContext context, String filename, String origFilter) +136Microsoft.Crm.Reports.ReportCache.CreateSRSReport(String name, String description, String template, String showin, String relatedEntity, String category, String filename, Boolean isNewReport, String defaultFilter) +100Microsoft.Crm.Application.Platform.Report. InternalCreate(String xml) +629Microsoft.Crm.Application.Platform.Entity. Create() +109Microsoft.Crm.Application.Forms.AppForm.R aiseDataEvent(FormEventId eventId) +404Microsoft.Crm.Application.Forms.EndUserForm. Initialize(Entity entity) +56Microsoft.Crm.Application.Forms.EndUserForm. Execute(Entity entity) +13Microsoft.Crm.Web.Tools.ReportProperty. ReportPropertyPage.ConfigureForm() +202Microsoft.Crm.Application.Controls.AppPage. OnPreRender(EventArgs e) +30System.Web.UI.Control.PreRenderRecursiveInternal() +62System.Web.UI.Page.ProcessRequestMain() +1499

Then this post is not about your message. Please go to A Freaky Microsoft Dynamics CRM 3.0 Blog for a fix for this error.

Instead. If you get this message below, then read on for the solution:

[CrmException: Exception of type Microsoft.Crm.CrmException was thrown.] Microsoft.Crm.Application.Platform.Report. InternalCreate(String xml) +721 Microsoft.Crm.Application.Platform.Entity.Create() +109 Microsoft.Crm.Application.Forms.AppForm. RaiseDataEvent(FormEventId eventId) +408 Microsoft.Crm.Application.Forms.EndUserForm. Initialize(Entity entity) +57 Microsoft.Crm.Application.Forms.EndUserForm. Execute(Entity entity) +13 Microsoft.Crm.Web.Tools.ReportProperty. ReportPropertyPage.ConfigureForm() +202 Microsoft.Crm.Application.Controls.AppPage. OnPreRender(EventArgs e) +30 System.Web.UI.Control.PreRenderRecursiveInternal() +62 System.Web.UI.Page.ProcessRequestMain() +1499

I've been struggling with this error message myself and thanks to a posting on a newsgroup by LeeAC, I was able to upload my report. Here's the posting he made:

The issue lay with our RS permissions. In addition to failing to upload reports, we tried downloading them from CRM too. This gave us an NT permissions error. So, we opened up (localhost)/reports, navigated to the CRM datasource (typcially 'Organization_MSCRM), then properties, then security, and then added a user / group called NT AUTHORITY\NETWORK SERVICE, and gave them the permissions of CRM Publisher. After that it all worked fine.



File or assembly name Microsoft.Crm.MetadataService, or one of its dependencies, was not found

Imagine.. You're writing a wonderful MS CRM 3.0 addon. After writing lines and lines of code, the time is there to run and test the addon. Instead of seeing your fantasic, state-of-the-art, rocket-science, cutting-edge addon, it is this message that arises:

Parser Error Message: File or assembly name Microsoft.Crm.MetadataService, or one of its dependencies, was not found.


Now how to solve this?

Well, Jonathan Randall has answered that question already in one of the newsgroups. Here's his posting:

The issue is caused because when you place your under application under the Microsoft CRM 3.0 web site, your application inherits the settings from the parent web site. Since the Microsoft CRM application has the two assemblies located in its own \bin folder, Microsoft CRM functions
correctly. However, your application does not have these assemblies in its \bin folder so as a result, the application fails to load. Here is some information that will correct the issue:

Symptoms: When a user attempts to access an ASP.NET web application that has its virtual directory located under the Microsoft CRM v3.0 Web Site in Internet Information Services (IIS), the following error will be displayed:

Server Error in '/' Application.

Further detail on the error includes the following:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: File or assembly name Microsoft.Crm.MetadataService, or one of its dependencies, was not found.

Source Error:

Line 11: <add assembly="Microsoft.Crm.ManagedInterop, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 12: <add assembly="Microsoft.Crm.MetadataHelper, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 13: <add assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 14: <add assembly="Microsoft.Crm.NativeInteropProxy,
Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
Line 15: <add assembly="Microsoft.Crm.ObjectModel, Version=3.0.5300.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Source File: C:\Program Files\Microsoft CRM\CRMWeb\web.config
Line: 13

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Microsoft.Crm.MetadataService' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Crm.MetadataService, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Appbase = file:///C:/Program Files/Microsoft CRM/CRMWeb/KBTest
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).

LOG: Publisher policy file is not found.
LOG: No redirect found in host configuration file (C:\WINNT\Microsoft.NET\Framework\v1.1.4322\aspnet.config).
LOG: Using machine configuration file from C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\machine.config.
LOG: Post-policy reference: Microsoft.Crm.MetadataService, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/kbtest/e724dea7/f72fefd/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/kbtest/e724dea7/ f72fefd/ Microsoft.Crm.MetadataService/ Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService/ Microsoft.Crm.MetadataService.DLL.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/kbtest/e724dea7/ f72fefd/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/kbtest/ e724dea7/ f72fefd/ Microsoft.Crm.MetadataService/ Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft CRM/CRMWeb/KBTest/bin/Microsoft.Crm.MetadataService.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft CRM/CRMWeb/KBTest/ bin/Microsoft.Crm.MetadataService/ Microsoft.Crm.MetadataService.EXE.

Version Information: Microsoft .NET Framework Version:1.1.4322.2300;
ASP.NET Version:1.1.4322.2300

Cause: Since the ASP.NET web application is located under the Microsoft CRM v3.0 web site, the application is inheriting settings that are part of the Microsoft CRM web site's web.config file. The Web.config file for a specific ASP.NET application is located in the root directory of the application and contains settings that apply to the Web application and inherit downward through all of the subdirectories in its branch. In this case, the Microsoft.Crm.MetadataService.dll and the Microsoft.Crm.Tools.ImportExportPublish.dll assemblies are being loaded by the Microsoft CRM web site. These two assemblies are located in the Microsoft CRM web application's \bin directory. Since these two assemblies are not part of the custom ASP.NET application, the Common Language Runtime begins a probing operation to locate the two assemblies. Since the assemblies are not installed into the Global Assembly Cache (GAC) or in the custom ASP.NET application's \bin folder, the exception is thrown.


There are four solutions to resolve the error. Each solution is detailed below.

Solution 1: Remove <add assemblies> entries in Microsoft CRM v3.0 web site's web config file.

In the <system.web> element of the web.config file, locate the <assemblies> node and remove the following entries:
<add assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add assembly="Microsoft.Crm.Tools.ImportExportPublish, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Solution 2: Install the Microsoft.Crm.MetadataService.dll and the Microsoft.Crm.Tools.ImportExportPublish.dll into the Global Assembly Cache (GAC).

The two assemblies that can be added to the Global Assembly Cache are located in the \bin directory under the Microsoft CRM web site's installation folder. A typical location would be C:\Program Files\Microsoft CRM\CRMWeb\bin.

Solution 3: Edit the ASP.NET web application's web config to remove the two Microsoft CRM assemblies.

Edit the ASP.NET application's web.config by adding the following entries to the <compilation> element that is nested in the <system.web> element of the file:

<compilation defaultLanguage="C#" debug="true">
<remove assembly="Microsoft.Crm.MetadataService, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove assembly="Microsoft.Crm.Tools.ImportExportPublish, Version=3.0.5300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

Solution 4: Locate the ASP.NET web application in a separate web site from the Microsoft CRM v3.0 web site.

Using this approach ensures that the application does not inherit any of the settings from the Microsoft CRM web site.

Jonathan Randall
Microsoft Online Support Engineer - MBS CRM Developer Support

Reporting Server not on MSCRM webserver?

If you have Reporting Server installed on a different server, then you should definately read this document:

This will help you to get Reporting to work again.

Happy reporting!

Callout debug: Access is Denied

I'm not sure if more people are experiencing the same thing, but at least I'd like to share this information with you.

After creating a debug build of a callout, I do copy the dll and pdb files to the \Microsoft CRM\Server\bin\assembly folder. Now I can normally debug the callout. But after modifying the code and copying the files again, then I cannot step into the code. CRM just steps over the whole callout.

When searching for a reason for this behaviour, I found a message in the event viewer. The message says:
Event Type: Error
Event Source: MSCRMCallout
Event Category: None
Event ID: 16912
Date: 6/22/2006
Time: 11:53:00 AM
User: N/A
Computer: CRMTest
Error: ISV code threw exception: assembly:
Microsoft.Crm.Sdk.FullSample.CalloutSample.dll; class:
Microsoft.Crm.Sdk.FullSample.Callouts.CalloutSample; entity: account,
event: precreate, exception: System.IO.FileLoadException: Access is
denied: 'Microsoft.Crm.Sdk.FullSample.CalloutSample.dll'.
File name: "Microsoft.Crm.Sdk.FullSample.CalloutSample.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark&
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm
at System.Activator.CreateInstanceFrom(String assemblyFile, String
typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder,
Object[] args, CultureInfo culture, Object[] activationAttributes,
Evidence securityInfo)
at Microsoft.Crm.Callout.CalloutHost.PreCreate(CalloutUserContext
userContext, CalloutEntityContext entityContext, String& entityXml,
String& errorMessage)

=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\Program Files\Microsoft
CRM\server\bin\assembly\ Microsoft.Crm.Sdk.FullSample.CalloutSample.dll
LOG: Appbase = c:\windows\system32\inetsrvLOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).

LOG: Policy not being applied to reference at this time (private,
custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
CRM /server/bin/assembly/ Microsoft.Crm.Sdk.FullSample.CalloutSample.dll.

For more information, see Help and Support Center at

Now how to solve this?
The resolution is quite simple. After copying the files to the assembly folder, you should give the user "Network Service" full permissions. The callout will work now and you will be able to debug the code.

Good luck!

Update: Ofcourse you can also give the user "Network Service" full rights on the bin folder of your project. You will not have to modify the file then again and again.

Add descriptions to relationship view

When working with relationships, you will find out that it would be useful to add the fields "Description 1" and "Description 2" to the associated view. This means that when you're in the account detail page and you view the associated relationships, that you will not only see "Party 1", "Role 1", "Role 2" and "Party 2". The description fields are useful to store additional information, but it would be really useful if you can show this data without the need of a double click on the record.

So Ronald. How do we do this?

Usually I'd say: "go to the settings, customization, relationships, forms and views and then modify the associated view. Now there's only one small problem. There is no forms and views for the relationships entities. There are 2 entities for relationships: Customer Relationship and Opportunity Relationship. In this article I'm using only the Customer Relationship.

Well, if the link is not there, then why not create a link to that specific page? This is the solution to this problem. The link to any view modification page is:
http://localhost:5555/tools/vieweditor/viewManager.aspx?id={guid}. We only need the guid of the view which is used for the associated relationship view. We can find this id by following the next steps:

- find out the guid of any account (open an account and press CTRL+N)
- go to this url (replace the guid with your account guid):
- view the source of the page
- search for "viewid"

The value of this attribute is the view guid which you should use in the url http://localhost:5555/tools/vieweditor/viewManager.aspx?id={guid}. Ofcourse you'll need to modify the port number if you have used another port.

Now you can modify the view as desired, for instance add the fields "description 1" and "description 2" to the view. After saving the modifications, you will need to publish the entity "Customer Relationship". And you're done!

Update September 4th 2007:
The article describes how to do this for the customerrelationship. If you need to do this for the opportunity relationship, then follow this url:

10.000 Visitors

After 10.5 months of blogging, 50 posts after the "hello world" posting, this blog has been grown to what I hoped it would be. A place to find interesting information regarding MS CRM with a personal touch. Obviously this is being appreciated by the CRM community because as of this day I have had over 10.000 visitors!

Thanks to all of you!

Finally there: Show and hide fields based on the users role!

Hi all,

I've been posting around showing and hiding fields more often. I won't be talking about that now, instead I'll be discussing the ability to perform JavaScript coding based on the users role.

This solution is very neat and very clean, though unsupported!!! Now... Let's get started and dig into this.

MS CRM has a lot of Javascript codes delivered with the product. One of these codes is located here: "/_controls/RemoteCommands/RemoteCommand.js". This file is being included into every page. One of the functions in this file is RemoteCommand(sObject, sCommand, sUrlBase). You can use this function to connect to CRM webservices.

Via Javascript you can get the userid of the currently logged in user via this RemoteCommand. This is done using this code:

var command = new RemoteCommand("SystemUser", "WhoAmI", "/MSCRMServices/");
var oResult = command.Execute();

Another webservice which is interesting is the UserManager webservice. By using this function, you can get all roles of the system. The roles to which the user is assigned are marked with "checked='true'". Here's the code to get this list

var command = new RemoteCommand("UserManager", "GetUserRoles");
command.SetParameter("userIds", "<guid>" + userId + "</guid>");
var oResult = command.Execute();

Now if we add this functionality to functions and add some try catches, then you'll end up with this code:

function getUserId()
var command = new RemoteCommand("SystemUser", "WhoAmI", "/MSCRMServices/");
var oResult = command.Execute();

if (oResult.Success)
return oResult.ReturnValue.UserId;
alert("Error while retrieving userid.");
return null;

function getUserRoles(userId)
var command = new RemoteCommand("UserManager", "GetUserRoles");
command.SetParameter("userIds", "<guid>" + userId + "</guid>");

var oResult = command.Execute();

if (oResult.Success)
return oResult.ReturnValue;
alert("Error while retrieving roles.");
return null;

Now we only have to add functions which checks if the user has a specific role. The final code is:

function getUserId()
var command = new RemoteCommand("SystemUser", "WhoAmI", "/MSCRMServices/");
var oResult = command.Execute();

if (oResult.Success)
return oResult.ReturnValue.UserId;
alert("Error while retrieving userid.");
return null;

function getUserRoles(userId)
var command = new RemoteCommand("UserManager", "GetUserRoles");
command.SetParameter("userIds", "<guid>" + userId + "</guid>");

var oResult = command.Execute();

if (oResult.Success)
return oResult.ReturnValue;
alert("Error while retrieving roles.");
return null;

function userHasRole(userId, roleName)
result = getUserRoles(userId);
if (result != null)
var oXml = new ActiveXObject("Microsoft.XMLDOM");
oXml.resolveExternals = false;
oXml.async = false;

roleNode = oXml.selectSingleNode("/roles/role[name='" + roleName + "']");
if (roleNode != null)
if (roleNode.selectSingleNode("roleid[@checked='true']") != null)
return true;

return false;

function currentUserHasRole(roleName)
userId = getUserId();
return userHasRole(userId, roleName);

Now you can check for roles by using the code listed down here:


You can copy and paste the functions as well as the last code in the form onload event. This is not really user friendly / readable though. If you copy and paste the functions to the global.js script instead, then you can use the last code snippet in the form onload.

Now. To get back to the subject "show and hide fields based on the users role"... If you modify the last code snippet to contain the showing and hiding fields as discussed in this article, instead of alert('true') and alert('false'), then you've got a very good customized system.

Thanks go out to Steven Brom (Qurius Advanced Solutions - NL) for supplying the codes!

Update 1: Thanks to Josh Painter who pointed me to the fact that I forgot to replace the < sign with <> in the codes.

Update 2: I mentioned that this solution was supported, but since we're using webservices from MS CRM other then the regular webservice, this is unsupported anyway... But still it's cool ;)

Update 3: This code doens't work on the outlook client. I'm still thinking about a solution to that.

Update 4: The code above is created for CRM 3.0. For CRM 4.0 look at the following blogs:

Hide and show fields based on the logged in user

There have been a lot of requests on how to hide and show fields since my earlier postings regarding hiding and showing fields and rows. John Straumann has written an article about this before. A working solution, but not too nice though.

Here's another solution which is unsupported (ofcourse ;) ), but it gives you a lot more freedom.

So how to tackle this problem. We already know how to hide and show fields. Now wouldn't it be great if we know what user is logged in? We would then be able to say (ofcourse modify the loggedInUser id with the guid of the user you need):

if (loggedInUser == '{123456789-1234-5678-9012-123456789012}'{ = 'none'; = 'none';
} else{ = 'block'; = 'block';

Now... how do we get that loggedInUser?
This is where it gets quite tricky. You can open the aspx page where you want to use this code. So why not add a little bit of asp coding in there? Lets say you want to use the code on the contact page. Then go to the server and open the "/SFA/conts/edit.aspx" page. Add this piece of code just before another script starts:

<script language="javascript">
var loggedInUser = '<%=Microsoft.Crm.Security.User.Current.UserAuth.UserId%>';

And now we have the loggedInUser! Save the file, store the javascript in the page onload and publish the contact. You will now have a page special for one user.
You can extend the codes as much as you like. You con for instance change the
This all is undocumented and unsupported. Therefore you should only try these kind of modifications if you feel comfortable with this.

Good luck!

Dynamics vision of Bill Gates

Unfortunately I didn't make it to the Convergence 2006. Luckily there are other ways to get the same information as what is given there. Microsoft has posted an article on PressPass regarding Bill's vision for the new generation of Business Solutions that enable people-ready business.

Read the article here.

Most important is that Bill outlined five key and unique pillars to Microsoft's approach to role-based productivity:
- Familiar, Tailored User Experience
- Service-Oriented Architecture
- Integrated Collaboration
- Immediately Insightful
- Rapid Development Composition

Read the article for more detailed information!

Article in .NET Magazine #12

Together with Sahin Ozdemir, one of my direct colleages, I have written an article regarding MS CRM 3.0 for the nr 1 Microsoft Developer magazine in the netherlands: .NET Magazine. Ofcourse all the Dutch readers already have a free (yeah, Dutch people love free things) subscription, otherwise get one now at: !

Back to the topic. We wrote an article, in Dutch, for programmer's. The main topics are:
- Customization tools
- ISV script / Form customization
- ISV code
- Import / Export
- Pre / Post-callouts
- Workflow services
- CRM Reports

A quote of one of the many replies we've got:
"This is the first time that a business application which improves productivity for programmers is exposed in a highly technical magazine on a way which is very interesting for .NET developers. This article does show perfectly what the addition is of Avanade in .NET minded Netherlands!"

Download the article here (Dutch only).

CRM Blog world

Wonderfull thing blogging. I'm doing this now for more then half a year and still am having fun to continue. But more and more blogs are coming up. There's a huge list now of people blogging mostly about MS CRM. So where is this list? Everyone has got some other blogs on their blogroll, but there is no full list. Well. Here's a list of what I think is the complete list of MS CRM blogs at the moment. Starting with the Microsoft people, then MVP's and then the other bloggers. Some blogs are marked with [inactive]. Those are blogs that have mentioned to stop or which do not have any CRM related post for the last half year. Furthermore there's no logic in the ordering. Hope you find some new information which you can use!

Microsoft Bloggers:
MSCRM Team Blog
MSCRM Partner Specialist Team West region
Andrew Bybee [MS -US]
Arash Ghanaie-Sichanie [MS - US] [inactive]
Ben Riga [MS - US]
Ben Vollmer [MS - US]
Benjamin Lecoq [MS - France]
Bill Patterson [MS -US]
Charles Eliot [MS - US] [inactive]
Charly Wood [MS - US] [inactive]
David Orlander [MS - Norway (language: norwegian)]
Jason Hunt [MS - US] [inactive]
Jim Glass [MS - US]
Jon White [MS - US] [inactive]
Jonas Deibe [MS - Sweden]
Joriz Kalz [MS - Germany]
Kevin Nazemi [MS - US] [inactive / cleared]
Marcello Fisicaro [ MS - Italy]
Menno te Koppele [MS - US]
Michael Rich [MS - US] [inactive]
Michaeljon Miller [MS - US]
Michaeljon Miller [MS - US] [inactive]
Philip Richardson [MS - US]
Philip Richardson [MS - US] [inactive]
Philippe Brisaud and Vincent [MS - FR (language: french)]
Prashanth Kaankadae [MS - US]
Praveen Upadhyay [MS - US] [inactive]
Ross Dembecki [MS - Australia]
Satya Nadella [MS - US]
Simon Hutson [MS - UK]


Aaron Elder [MVP CRM - US - Ascentium]
Aaron Elder [MVP CRM - US - Invoke Systems]
Aaron Elder [MVP CRM - US - Invoke Systems] [inactive]
Aaron Elder [MVP CRM - US - Invoke Systems] [inactive]
Andreas Donaubauer [MVP CRM - Germany (language: German)]
Andrii Butenko [MVP CRM - Ukraine]
Ayaz Ahmad [MVP CRM - Pakistan - Ovex Technologies]
Darren Liu [MVP CRM - Crowe Chizek - US]
Darren Liu [MVP CRM - Crowe Chizek - US (language: chinese)]
David Jennaway [MVP CRM - Excitation Ltd - UK]
David Yack [MVP ASP.NET - US - Colorado Technology Consultants] [CRM] [ASP.NET]
Frank Lee [MVP CRM - US - Workopia]
Frank Lee [MVP CRM - US - Workopia] [inactive]
Geoffroy Gabel [MVP CRM - FR (language french)]
Guy Riddle [MVP CRM - Australia - Snapdragon]
Guy Riddle [MVP CRM - Australia - Snapdragon]
Joel Lindstrom [MVP CRM - Customer Effective - US]
John O'Donnell [MVP CRM - US - Crowe Chizek]
Larry Lentz [MVP CRM - US - Lentz Computer Services]
Leon Tribe [MVP CRM - Australia]
Marco Amoedo [MVP CRM - Spain - Plain Concepts]
Matt Wittemann [MVP CRM - US - gTECHserv]
Matt Wittemann [MVP CRM - US - gTECHserv]
Michael Höhne [MVP CRM - DE - Stunnware]
Mitch Milam [MVP CRM - US - Infinite-X]
Nithya Balasubramanian [MVP CRM - India]
Ronald Lemmen [MVP CRM - NL - Avanade]
Scott Colson [MVP CRM - US]
Umar Khan [MVP CRM - Pakistan]

Company Blogs:
C5 Insight
Sonoma Partners

Other Bloggers:
Abe Saldana [US]
Andrey Slepitsky [Russia (language: russian)]
Anne Stanton [The Norwich Group - US]
Arne Janning [Germany] [inactive]
Asle Berg [Columbus IT - Norway (language: norwegian)]
Ben Hosking [UK]
Boris Kanlica [Turkey]
Brian [US]
Cafe CRM [FR (language French) ]
Carsten Groth [Germany (language: german)]
Catherine Eibner [Cybner - Australia]
Christian B. Mortensen [Denmark]
Cornel Croitoriu [Romania]
Craig Hamer
David Fronk [Dynamic Methods - US]
David Hawes [Avanade - UK]
Dejan Dular [Slovenia]
Douglas Leung [Unique World - Australia]
Erik van Hoof [CWR Mobility - NL]
Gagandeep Singh
Gareth Tucker [Avanade - Singapore]
George Doubinski [Australia]
Greg Owen [UK]
Guenter [ - Austria]
Gustaf Westerlund [Logica CMG - Sweden]
Hans Veldman [ACI - Netherlands]
Henry Cordes [Avanade - Netherlands]
Hero [India]
Ibrahim Sukari [RightServ - Australia]
Imran [Pakistan]
Imran [inactive]
Jeff Bennett [Solutions Consulting Group] [inactive]
John O'Connor [US]
John Straumann [Canada]
John Straumann [Canada] [inactive]
Julian Sharp [active again!]
Keith Delarge [Aspective - UK]
Kjell-Sverre Jerijærvi [Objectware - Norway]
Luis Mazario [Spain (language: Spanish)]
Maarten Dominicus [NL]
Mads Nissen [Norway] [inactive]
Maik Roempagel
Marcello Tonarelli [VAR Group - Italian]
Mario Raunig [ - Austria]
Mike Snyder [Sonoma Partners - US]
Mike Taylor [UK]
Neil Huffman [Productivegap - US]
Oguz KIRIS [Turkey]
Olivier Furnemont [METRUM SàRL - LUX]
Oshri Cohen [Canada]
Peter Florijn [NL] -
Peter Maude [inactive]
Phil Adams
Pierre Hulsebos [EHTC - US]
Rich Oyler & Nicholas Cole [Saratogaus - US]
Rob Bakkers [Avanade - NL] [inactive]
Robert MacLean [South Afrika]
Robert Peledie [UK]
Robert Peledie [UK]
Roberto Nocera [Avanade - Italy (language: italian)]
Roberto Vecchio [Italy (language: italian)]
Ron Kane [Scotland]
Ross Lotharius [Ascentium - USA]
Ryan Farley [inactive]
Sandor Schellenberg [Atos Origin - NL]
Seidl Michael [Germany (language english/german)]
Seth Kircher [Navint - US]
Stéphane Dorrekens [Belgiu]
Stephen Maij [SeeSharp - NL]
Steve Boyce [UK]
Wim Coorevits [U2U - Belgium]
Wolter Kreun [Netherlands]
Wolter Kreun [Netherlands]
Xavier Courchinoux

General CRM Blogs
Aina Neva Fiati [Indonesia]

MS CRM SDK 3.0.4

Microsoft posted the newest version of the SDK for MS CRM 3.0 yesterday. We're on version 3.0.4 now.

Download the SDK here.

The Microsoft CRM 3.0 SDK is for developers, system customizers and report writers. It contains the following sections:

Server Programming Guide – A guide for developers writing server side code, custom business logic, integration modules, workflow assemblies and more. This guide provides an architectural overview of Microsoft CRM, the entity model, security model, Web services, and sample code.

Client Programming Guide – A guide for developers customizing the Web client or the Microsoft CRM client for Outlook, including scripting, integration of custom Web pages, and sample code.

ISV Programming Guide - A guide for independent software vendors (ISVs) developing installable add-ins for Microsoft CRM.

Report Writers Guide - A guide for developers writing reports for Microsoft CRM using Microsoft SQL Server Reporting Services Report Designer.

Hiding rows


Have you already tried to remove fields as described in this article?

I've been using this quite some time now, but I noticed something weird. When you have removed two fields which are on the same line, then you don't want to see this row at all. Well, this doesn't work by default.

By using jscript you'll need to access the table row and hide it. This doesnt work with the style.visibility = 'hidden'. Instead, you should use this line: = 'none';

This row should remove the whole line. Yes, thats what it should do. So if it doesn't do that, what does it do? It removes everything except for picklists. You’ll need to hide those manually as described in the other article: = 'none';

It's not business critical, but it does fine-tune your UI when working with advanced UI manipulation.

Good luck!

Robert Amos mailed me his solution. He's hiding complete sections. Here's part of his mail:

I usually pick the first (top left) field in CRM and work on it:
crmForm.all.firstfield_c.parentElement.parentElement. = 'none';

That should pick the element containing the entire section and suck it out of the form. So I've been hiding non-relevant sections so the user doesn't get confused. Keeps it clean :)

Readonly fields

Ryan Farley has written a nice article about making fields readonly. Ryan has written several good articles from a developers point of view. I expect there will be more good work coming from his hands. Welcome in the world of CRM bloggers Ryan!


It's been a while since my last posting. Well, for that I do have a good reason. I've been in France, Alpe d'Huez, for a week for winter holidays. Until the day before my holidays I didn't know for sure if I could go on holidays because of a high priority CRM project. Luckily for me the project has been delayed and so I have been snowboarding a week long!

I've been back for several days now but I'm still walking around with pain in my muscles. Not too weird though if you know that every day me and my friends started with a black piste for warmup and furthermore spending the day off-piste and in the funpark ;-)

Here's a picture of me with one of the jumps last week.

Are there more snowboarders who work with CRM? Or should I put it the way around: Are there more people who work with CRM and do a bit of snowboarding in their spare time? ;)

How to rename area's

Quite often I see the question "how do I rename an area in CRM v3.0?".

I could write an own example, but Arne Janning already did so in the public community. Here's his post:

In the CRM-web-client click --> Settings --> Customization --> Export Customizations --> mark Site Map --> More Actions --> Export Selected Customizations --> Hit OK on the dumb dialog.

You get a customizations.xml-file to download. In that file you'll find five area-elements: Workplace, SFA, MA, CS, Settings. These areas define the top-level structure of the "Wunderbar" (the Outlook-style navigation).

This is an example for an area-element:
<area id="SFA" shape="RECT" coords="0,0,0,0" resourceid="Area_Sales" icon="/_imgs/sales_24x24.gif" descriptionresourceid="Sales_Description">
To customize this you could add the "Title"-attribute to overwrite the ResourceId:

<area id="SFA" title="Clients" shape="RECT" coords="0,0,0,0" resourceid="Area_Sales" icon="/_imgs/sales_24x24.gif" descriptionresourceid="Sales_Description">The strucure of the sitemap is well documented in the SDK, which BTW has been updated and improved lately :o)

Microsoft CRM 3.0 SDK

Client Programming Guide --> Navigation Configuration: SiteMap

Once you have finished your customizations in the sitemap you can upload the again:

Settings --> Customization --> Import Customizations --> select your file --> upload, publish and hit F5 to reload the Wunderbar.

Hope that helps.

Getting inside MS CRM

If you think that solutions which are on this blog are unsupported, then take a look at the post which my new German colleague Arne Janning has posted:

Getting inside Microsoft CRM - Part I

He'll get you virtually inside crm and from there you will be able to do anything that you have ever wanted to do with MS CRM.

I'll have to warn you: if you don't feel comfortable with what you see, then just don't try this. You'll likely be messing up your (clients?) system :-)