Update Rollup 2 is available for Microsoft CRM 1.2

Update Rollup 2 is a tested, cumulative set of updates for Microsoft CRM Server 1.2, Microsoft CRM Sales for Outlook 1.2, and Microsoft CRM-Exchange E-mail Router 1.2, including performance enhancements, that are packaged together for easy deployment.

Find more info here:

Or download the package here: http://www.microsoft.com/downloads/details.aspx?FamilyId=172861AE-D02E-4441-B432-26E88DD0AB14&displaylang=en

Microsoft Announces General Availability of Microsoft Dynamics CRM 3.0

Microsoft has kept their promise and went GA today. The product is offered in a Professional Edition and a Small Business Edition, and is immediately available in English worldwide. Dutch, French, German and Russian versions of Microsoft CRM will be available Jan. 1, 2006, and 17 more language versions will be released in the coming months.

Read the full press release here:

Other articles released today:
Customers Demonstrate the Power of Microsoft Dynamics CRM 3.0

Worldwide Partners Demonstrate Support of Microsoft Dynamics CRM 3.0

CRM v3.0 SDK Update

Hi all!

For the programmers under us, you can now download an updated version of the SDK for CRM 3.0! A lot of bugs which were in the preliminary version are gone and they have extended this SDK with more comments and articles.

Download the SDK here:

Kind regards!

SRS and MSCRM (1.2) on 1 server

The people who have tried to install both SRS and MSCRM on the same server within the same website in IIS, they must know the message:

Server Error in '/Reports' Application.

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: Assembly microsoft.crm.platform.types.dll security
permission grant set is incompatible between appdomains.

Source Error:

Line 5: <assemblies>
Line 6: <add assembly="Microsoft.Crm.Platform.ComProxy, Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad34e35">
Line 7: <add assembly="Microsoft.Crm.Platform.Types, Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf385ad364e35">
Line 8: </assemblies>
Line 9: </compilation>

In this case MSCRM is in the root of the website and reporting services in the folder "/Reports".

This can be solved by modifying the web.config of MSCRM. Add this code to the web.config just before the <appsettings>part of the file. Make that you modify the PublicKeyToken and if necessary also the versions!

<!-- Support for SQL Reporting services -->
<location path="Reportssrs">
<compilation debug="true" defaultlanguage="C#">
<remove assembly="Microsoft.Crm.Platform.ComProxy, Version=1.0.0000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<remove assembly="Microsoft.Crm.Platform.Types, Version=1.2.3297.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<pages enablesessionstate="true" validaterequest="false" enableviewstate="true">

No fear for bad news anymore!

Do you ever fear telling bad news to your boss or client? Did you break the CRM implementation? You won't make the deadline? Soon you will not know fear anymore! Read this article on the newscientist and understand why :)

Want to be the MBS Chief? Go for it!

Microsoft is shuffeling with the positions on the top of the MBS practise. They are searching now for a new MBS Chief. So if this has been what you're dreaming about the last 5 years, then go and hunt for that position!

Read more about this at microsoft watch

MS Dyn. CRM 3.0 on MSDN

For all of the developers who have access to MSDN subscriber downloads, I do have great news! The RTM version of MS Dynamics CRM 3.0 is ready to download!

On MSDN there are 2 versions available:
- CRM 3.0 Professional Edition
- CRM 3.0 Small Business Edition

The MSDN licence keys are available in the keys section.

Microsoft Dynamics CRM 3.0 Has Arrived!!

David Thacher’s team did what nobody expected. They have gone RTM with Microsoft Dynamics CRM 3.0 yesterday already! Within about 2 weeks the bits will be provided for download and more information will follow really soon.

But how could Microsoft go from beta to RTM in a week? Brad Wilson (GM, Microsoft CRM Business) anwers:
Last week we announced the third drop of our Early Access program for Microsoft CRM 3.0. We released our TAP2 build in July, our TAP3 build in early October on our field readiness tour, and our RC2 build last week. This last pre-release drop was picked up by the press as our “beta”, despite the fact that it wasn’t a “beta” in the traditional sense.
We’ve now received the great news that our development team has over-delivered on their commitments by shipping CRM 3.0 early. We simply need to ensure that people understand what our Early Access program was about, and to stress the fact that we’re giving the people what they want (a production-ready version of CRM 3.0) sooner.

Please join me in congratulating David and his team!

Finally there: CRM EAP Beta!

Update: You can download the Beta now yourself, if you are a registered partner.

Good luck!!

I do know that the www.mscrmearlyaccess.nl and the partner portal have not yet changed, but the private betaplace website has. It's only a matter of seconds before you can download the beta yourself. Keep watching http://www.mscrmearlyaccess.nl/ and the partner portal!!!

Remember, it's a beta product and is not ment to be used for production used. The license key provided with the beta provides 10,000 Microsoft CRM Professional licenses on a trial basis and will expire after 90 days.

Note! Don't forget to send the bugs you find to the product team. Your feedback on ANY aspect of the Microsoft CRM aV3.0 application is important whether the feedback is "friendly" or not. Honest Feedback above all is critical!

New blog in MSCRM world

Kevin Nazemi, Lead US Product Manager for Microsoft CRM, started a blog regarding MSCRM as well. He'll be able to give inside information, so I do expect lots and lots of good information here: http://blogs.technet.com/microsoftcrm/

Kevin, welcome in the MSCRM blog world!

Welcome visitor nr 1000!

A short look on the statistics shows us that some seconds ago somebody from Austria has been the 1000th visitor on the blog. Since I do get a lot of feedback on my posts and the amount of visitors is raising day by day, I'll continue this way of providing interesting MS CRM information to the community.

Stay tuned for more information!

Cme @ VS 2005 Product Launch Event

The 7th of November. This day there is the product launch of VS 2005, MSSQL 2005 and BizTalk 2006. A new era of product development will start this day. The Dutch developers can still sign in for this event.

I'll be around there as well. Drop me a line if you want to drink a beer (heineken ofcourse!) or just for a chat.

See you there!

SDK CRM v3.0 (Preliminary) public!

Via Arne Janning I received this link.
You can download the priliminary SDK for MSCRM v3.0 here. There's a lot of interesting information in here.

One of the most interesting images available is:

(dont pay too much attention to the CRM 2005 sign :) )

The orange area's are locations where you can insert own customizations. Here's a detailed list of features which are in line with the integration points as shown in this image:

Add Entity

You can add new entities to the system:
• Define the schema for the new entity.
• Automatically creates the user interface, for example, forms or views, to show the new entities in the application.
• Define relationships to other system or custom entities.
• Define delete behavior for linked entity instances.
• Custom entities are secure according to the security model.
• Option to take new entities offline.
• You can export and import custom entities to another system.
• Special privileges are needed for entity customization to ensure system integrity.

Entity Rename

You can change the name of system entities to better suit your business:
• Any customizable entity can be renamed.

Activity Customization

Activities can be customized to better suit your business:
• Activities are customized entities. You can change the schema, forms & views as needed.
• Each activity type, such as Task or Fax, can be customized independently of the others.
• Create custom activity views that can aggregate the different activity types. For example, you can create a view that show all open activities assigned to a user regardless of activity type.

Client Side SDK

The client side SDK exposes an expanded forms architecture for application customization:
• Support for read-only fields. Protect fields from user update by setting them to read-only.
• Support for IFrames. Embed other Web pages as links within Microsoft CRM forms. Includes programmatic access to the other data attributes on the parent form.
• Enhanced control over form layout. You can specify the field height on forms and there is greater flexibility in tab and section sizing.
• Improved form editor is larger, resizable, preserves formatting, and uses correct escaping.
• Form debugging: Form editor has previews for onLoad and onChange events, and simulates the onSave event.

Features in the Client Side SDK

Form Events
• OnLoad – Executes custom code when the form has loaded.
• OnSave – Executes custom code when the user saves an entity.
Field Events
• OnChange – Executes custom code when the data in a form field has changed and focus is lost.
Form Object Model
• Attributes – FormType, ObjectId, and ObjectTypeCode.
• Methods – IsOutlookClient, Save, and SaveAndClose.
• Able to address a specific field on the form, set, and read its value.
• Referencing field: crmForm.all.{field schema name}.
• Common field properties and methods - DataValue, Disabled, ForceSubmit, and SetFocus.
IFrame on Forms
• Ability to embed other Web pages as links within Microsoft CRM forms HTML Iframe object.
• Tab and Section configurable.
• Ability to set width and scrolling.
• Cross-frame scripting can be restricted.

UI customization features in Web client

Customize the Web client application by adding custom menus and buttons to the ISV.config file:
• XSD compliant schema.
• Application level toolbar.
• Actions for custom entities.
• Support for JavaScript.
• Support for Marketing Automation and Service Management.
• Top-level navigation bar.

UI customization features in Outlook client

Customize the Outlook client by adding custom menus and buttons to the OutlookClient.xml file:
• XSD compliant schema.
• Application-level toolbar.
• Actions for custom entities.
• Support for JavaScript.
• Support for Marketing Automation and Service Management.
• Top level navigation bar.

Import/Export Features

• Improved UI in the Web application.
Export/Import - ISV Setup
• Import is the supported way to modify forms, views, queries, and mappings for your custom add-in.
• Configured customizations are saved to the XML file by export.
• XML file is transportable between systems.
• Import/Export schema is published in the SDK.
• Support for system and custom entities.
• Support for renamed entities.
• Support for client side SDK features.
• Support for custom relationships.
• Support for saved queries (but not user queries).
• Granularity to choose which entities to import, export, or publish.
• Support for templates.
• Support for the ISV.config file for import and export.
• Support for entity mappings.
• Validation of XML prior to the import.
• Import, export, and APIs are exposed in the SDK.

Workflow features

• Workflow rules can call out to .NET assemblies.
• Includes date support for updates and if conditions.
• Triggering of workflow rules from activity events.
• Enhanced date support on wait conditions.
• Partial slug support.
• Unified slug support, similar to application.
• XML configuration file.

Callout enhancements

• Pre-callouts and post-callouts to .NET assemblies.
• Supports backward compatibility with COM based v1.2 design.
• Supports Create, Update, Delete, SetState, Assign, and Merge.
• Supports synchronous post-call outs.
• XML configuration file.

Now tell me, does this open a world of possibilities for the developer?!!

Wordverification when commenting

Hi All,

Today I've turned on word verfication for posting comments. What this does is to prevent automated systems from adding comments to this blog, since it takes a human being to read the word and pass this step.

Quite often I am encountering comment spam. A lot of this is done automatically by software which can't pass the word verification, so thats why I set this option.

Please do not let this stop you from commenting the posts :)

Override save method

!unsupported alert!

Unsupported, but this works :)

I do sometimes get the question how it is possible to override the save method. You could dig into the javascript files or htc files, but following this solution is a lot better.

You can modify the aspx file, which you want to change the behaviour of the save button. Insert this script into the file and you will get an alert before saving the file:

<script language="javascript">
//make the form aware of our new save method
function window.onload(){
crmForm.onsave = overriddenSave;
crmForm._bUseCustomSaveEvent = true;

//implementation of the new save method
function overriddenSave(){
//do your thing here
alert('Your modifications will be saved now');

//save the form.
crmForm.SubmitCrmForm(1, true, false, false, false);

Hope this helps!

Include Javascript files in CRM

This must be familiar to most of you: you're making quite some modifications to the onchange event of a picklist. To keep this readable, you do use tabs and breaks, but after saving this, all tabs and enters are gone. Therefore I like to put most code into .js files and include these files in the page. This would break the contract tough. Another possibility is the httpmodules, but they require quite some effort.

Now I was searching for some information regarding Javascript and I found some interesting codes. One of these could be used to solve the problem as described above! What about loading javascript files WITH javascript? It is possible by using this script:

var script = document.createElement('script');
script.type = 'text/javascript'; script.src = 'code.js';

When putting this code into the onchange event, this stays readable, does not cost much effort and you wont break the support contract!

The script above could give troubles when a function call is made to the javascript file when it is not yet fully loaded. Thanks to Alex for providing this script:

function OnChange()
var script = document.createElement('script');
script.language = 'javascript';
script.src = 'MyFunctions.js';
var f = function()
if (event.srcElement.readyState == "loaded")
SomeFunction(); // some function from MyFunctions.js
script.attachEvent("onreadystatechange", f);
// function OnChange()

Just a bit better readable script:

var script = document.createElement('script');
script.language = 'javascript';
script.src = '/Custom/JavaScript/opportunityOnloadOnsave.js';
script.onreadystatechange = OnScriptReadyState;

function OnScriptReadyState()
if (event.srcElement.readyState == "complete")
//perform onload scripts
CustomOnLoad(); // some function from your custom js file

Introducing Microsoft CRM 3.0

Even though the public beta is not yet available, more and more information is being spread to the partners. Partners who can access https://partner.microsoft.com/ are able to view this information:

Microsoft CRM 3.0 Press Release
Microsoft announces the next version of its customer relationship management solution, Microsoft CRM 3.0. Microsoft CRM 3.0 will provide a complete suite of powerful marketing, sales, and service capabilities, all with a familiar and consistent user experience based on Microsoft Office and Microsoft Outlook.

Microsoft CRM 3.0 Fact Sheet
Learn about top features and functionality that will be coming in Microsoft CRM 3.0.

Microsoft CRM 3.0 Flash Demo
Download the Microsoft CRM 3.0 Flash demo and demo script to preview Microsoft CRM 3.0 in action.

Microsoft CRM 3.0 Upgrade Video
Watch this video to see how easy the upgrade from Microsoft CRM 1.2 will be. In fact, it's “kid stuff.”

Worldwide Partner Conference 2005 Presentation
This PowerPoint presentation summarizes the key messaging, timelines, and features of Microsoft CRM 3.0.

Update: Now including correct links :o)

Microsoft CRM Cisco IPCC Enterprise Connector

Take a look at this! Vladimir Lichman just emailed me about a new product for MS CRM 1.2: Microsoft CRM Cisco IPCC Enterprise Connector. This application enables small and medium-sized businesses or empowered branch offices to fully tap the potential of both Microsoft and Cisco to provide a complete CRM solution. Its advanced feature set includes:
- Legacy interface
- Screen pop on incoming call
- Screen pop from click to dial calls
- Click to dial
- Tracking time duration
- Easily create a new CRM record
- Automatically call record and atach it to the MS CRM contact record

Unfortunately I do not have an Cisco IPCC Enterprise here, but it definately is usefull for the lucky ones who do!

More info: http://www.ithit.com/eng/crm

"Please verify that you have enough Crystal licenses"

The error message "Please verify that you have enough Crystal licenses" is really awfull. This is some kind of general crystal error and probably does not have anything to do with licenses!

I've had this myself and with me a lot of other people on the newsgroups. If you are experiencing the same, then you should take a look at the following kb articles. There are 12 possible resolutions for this error which are described in these KB articles:
- 875086
- 862678.

You can access them via https://mbs.microsoft.com/knowledgebase/search.aspx or https://premier.microsoft.com

In case you cannot access these, they are also available via newsgroup postings:


Time for Crystal to be replaced by SQL Reporting Services :)

For researching purposes, you should try to open this file in IE: http://crmserver/Reports/crystallogon.csp.
You should see something like:

If there is a message regarding the MSCRMuser which cannot be found, then try to rebuild the Crystal APS database (kb 862678, see above).

Incompatible database version

It happened to me several times by now that I get error messages related to an incompatible database version. Examples of error messages are:

Error: Incorrect or incompatible database version. If you have applied any patches or hotfixes for Microsoft CRM, please apply them to this server as well.-2147467259 (0x80004005) Description: Unspecified Error.


The version of cdf database you are attempting to use does not match the version of your microsoft crm database.

These errors might prevent you from installing hotfixes, running the Data Migration Framework tools or even prevent the security service to start up. In this case there is something wrong with the version number of the database. This number is stored on several locations. All of these should be the same. The locations this number is stored are:

- CRM Database: "[clientname]_METABASE" Table "BuildVersion"
- CRM Database: "[clientname]_MSCRM" Table "BuildVersion"
- CRM Database: "cdf_mscrm" Table "cdf_BuildVersion"
- Registery key: HKLM SOFTWARE Microsoft MSCRM CRM_Server_Version
- Registery key: HKLM SOFTWARE Microsoft MSCRM Database Version
- Version of file c:\program files\microsoft crm\server\bin\crmsecurityservice.exe.

The error should be gone when you modify these to reflect all the same number. Before making any modifications to any of these settings, you should ofcourse make sure that you do have backups.

Microsoft seems to have started Start.com

Microsoft seems to have started Start.com. This site is a fully functional webbased rss reader. There is still the sign 'preview', but the links to start.com/1, start.com/2 and start.com/3 have disappeared. Start.com definately has the best look and feel compared to the competition of Google and Yahoo. Login to this website works with a .NET Passport. Take a look there and start reading the rss-feeds there :)

CRM 3.0 early adopter program

Microsoft CRM 3.0 will soon be released. Before this release there are some early adopter projects. Microsoft has selected 20 partners for this program and Avanade is one of them! Avanade Netherlands will do this early adopter project together with Bouwfonds. I'm looking forward doing this project a lot.

Too bad we are not allowed to say much, but I will post some interesting discoveries regarding 3.0 soon.

Stay tuned!

Advanced UI Customization

Joris Kalz wrote a truly amazing article on high quality CRM UI Customization, without breaking the supports contract with Microsoft.

I couldn't believe that modifications like hiding tabs could be done on a supported way, but here is the proof:

I have been checking how this is done and definately this is going to be my new standard for making modifications! Check the article here: Part II of Advanced UI Customization

Enjoy the summer

Time for some Cme! Last week I've been doing some kind of a euro trip together with one of my friends Ed. Within 8 days we have visited:
- Germany
- Austria
- Slovenia
- Croatia
- Italy
- Swiss
- France
- Belgium
- And ofcourse The Netherlands...

The main goal of the holidays was to visit another friend, Walter. He's a travelguide in Croatia this summerholiday. Let's show you some picture we have made. You can click them to view them a bit better. Not too good though, because I don't want to scare you off :)

This is our fellowship of the holidays. Left is Walter, Ed is in the middle and that makes me on the right side:

And our tent:

Believe it or not, we even have made food ourselves on this camping!

During our stay there we have visited some of the ATP tournament matches. One of the players we have spotted is Moya:

After Croatia we have been searching for Mickey. And where can you do that better then in Euro Disney Paris:

Last but not least, watch this one:

As you can see, I have been doing a lot. I hope you have had a wonderful time as well!

Windows Vista

I thought I'm a geek, but you really should watch these guys. These are the real ones! Watch the Windows Longhorn Productname Launch Video.

Anyway here's the logo which belongs to the new Windows version:

MS SQL Reporting Services Reports for MSCRM including basic security

Microsoft CRM is using Crystal Reports for reporting purposes. This works pretty fine as long as you do not want to modify reports or create your own reports. Crystal will then become very slow if you are working with thousands of records in your database. You could tweak Crystal, but instead, you could also take a look at MS SQL Reporting Services (SRS). Microsoft has released a report pack for MSCRM v1.2 which includes 6 reports. This report pack will give you a quick start on working with SRS Reports in MS CRM. But, when examining these reports, you will notice that the security rights which are set within MS CRM are completely gone when requesting these reports! In this posting I will show you how to create basic security for custom SRS reports.

The security in MSCRM is working with Security Descriptors. We cannot use these Security Descriptors in SRS. Therefore we will have to recreate the security settings. These settings are all stored in the database. Depending on how much security is required for your business, you can get the settings. In this example I will show you how to include settings on business unit level. Let's assume that you are working in an international company called Avanade. The headquarters are in the USA and there are several other locations in other countries including The Netherlands and France. In the end of the example, the users which reside in The Netherlands are able to see the Dutch accounts, the France users the France accounts and the headquarters will see all accounts.

For this example I do expect you to install Windows, Visual Studio, MSSQL and Reporting Services on your own. That shouldn't be too hard though :)

As soon as you have Reporting Services installed, we can start creating our report. We will do this in Visual Studio. There should be a new project type: "Business Intelligence Projects". From this project type we will select "Reports Project". Within this project we will chose to add a new report (Solution Explorer, right click on Reports and select "Add New Report"). Visual Studio will ask you to first create a Data Source. Please fill in a nice name, select SQL Server and enter your connection string. You will probably use this Data Source more often, so it would be useful to select the checkbox "Make this a shared Data Source".

Now its time for the real work. Let’s create the query. A user from the Netherlands should only see Dutch accounts. We will achieve this by using the userid. Based on this GUID we can find out in which Business Unit this person resides. If this is the top BU, then we should select all accounts, otherwise we select a filtered set of accounts. The first step is to select every account which resides in the same business unit as the user. This query will get us there.

SELECT @owningBU = BusinessUnitId FROM SystemUserBase WHERE SystemUserId = @userid;

SELECT Name, Telephone1, Description
FROM Account
WHERE (OwningBusinessUnit = @owningBU)

As you can see, I am using the view Account instead of the table AccountBase. This view has already the address data included, which saves me a lot of query coding.

As soon as you press enter after entering the query, you will get a lot of layout options. Currently I do not care too much about how the report looks, so let’s choose to finish this report. When viewing the report in the preview window, you should enter a guid of a user which does own some accounts. Just to be sure that you do get some results.

If you enter the userid of a user which resides in the USA Business Unit, then you will only find USA accounts. We can solve this by making sure that this query will also search for accounts which are in child business units. I have created a user defined (recursive) function which accepts a GUID and returns a table with all the child business units. Here is the function:

SELECT BusinessUnitId FROM BusinessUnitBase WHERE ParentBusinessUnitId = @currentBU

OPEN BU_Cursor

/* Read current */
FETCH NEXT FROM BU_Cursor INTO @businessunitID

/* Return current */
INSERT INTO @businessunitsTable
VALUES (@businessunitID)

/* Return children */
INSERT INTO @businessunitsTable
SELECT * FROM dbo.GetChildBU(@businessunitID)

/* Read next current */
FETCH NEXT FROM BU_Cursor INTO @businessunitID


With this function in mind, you can modify your initial query to include these Business Units. This will be the result:

SELECT @owningBU = BusinessUnitId FROM SystemUserBase WHERE SystemUserId = @userid;

SELECT Name, Telephone1, Description
FROM Account
WHERE (OwningBusinessUnit = @owningBU) OR OwningBusinessUnit IN (select * from GetChildBU (@owningBU))

If you have added the function to the MSCRM database and modified the query for the report, then you should be able to see all the accounts in the users Business Unit and all the child Business Units.

OK, now the reports are fine, but where do we store them in CRM? It would not be logical to store some of the reports under the reports part in the Navigation bar and some modified reports in the Left pane or menu bar. You will probably want them to be in the same screen as the other reports. This you can solve by modifying the map_xml.aspx file in the Reports folder. You can copy and paste one of the other items and you will have a link to your reports. Just put them in a fancy -if possible looking like crm- datagrid and you have extended CRM with your own reports! Please keep in mind that the last modification is unfortunately not supported...

Happy reporting!

"Parser Error Message: Access is denied:

Every now and then I get this error message:

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: Access is denied: 'MyWebApp'.

Source Error:

Line 198: <add assembly="*">

This doesn't say much, but Harish Ranaganathan wrote a wonderful solution for this error message.

Keep up the good work :)

Full-Text Search is not enabled for the current database

After using the redeployment tools it is sometimes not possible to search for KB articles in CRM. The error which shows up (either on the screen or in the event viewer) is:

Full-Text Search is not enabled for the current database. Use sp_fulltext_database to enable full-text search for the database.

Here is the resolution:

Ensure that the Microsoft search service is running and set to start automatically. This can be verified under the Control Panel > Administrative Tools > Services.
Enable (or re-enable) full text search on the databases. Open Query Analyzer and connect to the production databases. Run the following query, where is the database that ends with “_MSCRM”:

use <database>
exec sp_fulltext_database 'enable'

Repopulate the catalogs. This is done by going into the _MSCRM database, looking at the Full Text Catalogs under the database, and right clicking on the ix_* file and clicking on “Start Full Population”. Populating the index might take some time. However, there should be no impact on the users during this time.

Multi select box in MSCRM v1.2

The current controls which can be put on a CRM entity form are:
- String
- Integer
- Float
- Currency
- Date/Time
- Boolean
- Picklist
- Memo

As you can see, there is no such option like a multi select box. Even within CRM you do sometimes need this. For example: Several contacts are receiving business gifts every now and then. You do not want the enduser to fill in which gifts they received in by hand, because they might make typing mistakes. Then you can't use this field for searching. So you want to use a multi select box.

In this article I will describe a way to create a workaround for archieving this by using a combination of a picklist and a memo field.

First we will have to add the picklist and memo field to the deployment manager. We will add a picklist called CFPgifts and a memo field called CFMgifts. It probably wouldn't surprise you that the next step is to add these fields to the contact form of CRM. We will add them under eachother, the picklist on top, the Memo under. I have removed the label for the Memo field to make it look better.

Now we can fill the picklist with the values. I have added the values 'Christmas card', 'Wine', 'PDC tickets'. Now we need to copy the selected value to the memo field. This will be done by using Javascript. The properties window of a picklist field allows you to add some scripting to the onChange event. This field is very useful, but not really user friendly. First lets get the control working, later I will describe an easier way to modify the script.

We communicate with the picklist value by using:


The memofield is available by using:

That means that if we enter this script in the onChange event, that we can copy data from the picklist to the memo field:
crmForm.CFMgifts.value = crmForm.CFMgifts.value + crmForm.CFPgifts.value;

Don't forget to switch the event on with the checkbox!

Now we can extend this task by putting a separator between the values. We should also check if the new item is a new item or if it is already in the list. If we add all this to the onChange event, then that small box will not be clear anymore. It also removes the breaks you enter manually. Therefore I prefer to only call a function from this onChange event and store the real code in a separate file, although this is not support. To do this, we have to modify the edit.aspx located at: drive:/website/SFA/conts/edit.aspx. In this file there are several other javascript files linked. We add one for ourselves which will look like this:

<script language="javascript" src="/sfa/conts/PicklistEx.js"></script>

Here is the file which includes the separator and check for existing items.

// Functions needed by the multi select box in MSCRM
// Author: Ronald Lemmen
// Company: Avanade Netherlands

// function to check if an item exists and if not, add it to the item list
function checkAndAdd(item, itemlist){
if (item != ""){
if (checkItemExists(item, itemlist) == false){
itemlist = addItem(item, itemlist);
itemlist = clearup(itemlist);
return itemlist;

// function which adds a new item and clears up the item list
function addItem(newItem, itemlist){
return newItem + ";" + itemlist; //modified by ronald 05-11-04

//this function checks if the submitted item is in the list;
//this can be done by checking on ;item; ;
//an item like "wine" is not the same as "red wine";
function checkItemExists(item, itemlist){
itemlist = strReplaceAll(itemlist, " ", ""); // remove the spaces from the existing list;
item = strReplaceAll(item, " ", ""); // also remove the spaces from the new item
itemlist = ";" + itemlist + ";"; // also the first charactar without a semicolon will be recognized now.;
if (itemlist.indexOf(";" + item + ";") >= 0){
return true;
return false;

function clearup(itemlist){
itemlist = strReplaceAll(itemlist, ";;", ";"); // remove double semicolons;
if (itemlist.substring(0,1) == ";"){ //remove the first semicolon;
itemlist = itemlist.substr(1);
if (itemlist.substring(0,1) == " "){ //remove the first space;
itemlist = itemlist.substr(1);
return itemlist;

//function to search and replace all occurances of a string;
function strReplaceAll(str,strFind,strReplace){
var returnStr = str;
var start = returnStr.indexOf(strFind);
while (start>=0){
returnStr = returnStr.substring(0,start) + strReplace + returnStr.substring(start+strFind.length,returnStr.length);
start = returnStr.indexOf(strFind,start+strReplace.length);
return returnStr;

When this file is stored on the correct location (drive:/website/SFA/conts/PicklistEx.js), then you can modify the onChange event to:
crmForm.CFMgifts.value = checkAndAdd(crmForm.CFPgifts.value, crmForm.CFMgifts.value);
This keeps the CRM code readable and you will be able to modify this code a lot easier compared to that small box. Now you just have to publish the modifications and run an iisreset and you're done.

You might want to enhance this control. Now the users are still able to modify the memo field by hand. You could add another picklist which will remove values from the memo field and then disable the memofield upon opening of the form. This is up to you to create :)

Update: James indeed did take the time to enhance this control and to make this for CRM 3.0! See his blogpost at this address:

Hello world!

How original!

Starting the first post with a holy "Hello world".
On the other hand, I'm also not the first one starting a blog. But I do think that I help other people with this blog. Here you will find information about CRM, C# and a little bit of myself. Feel free to contact me for clarification or whatever you would like to contact me for.

See you soon again,

Ronald Lemmen