Archive for September, 2008

Quick Tip: Passing CRM Form values to an IFrame

September 12, 2008 Leave a comment

Passing values from a CRM form to a page outside CRM through an IFRAME is one of those quick 2-minute customizations. Let’s say the target of an IFrame on the Account form is an ASPX page which expects the Account name and the value of a custom attribute from the parent form for further processing.

First things first, create the custom attribute and an IFrame. We will set the URL of the IFrame dynamically.


Place this code snippet in the onLoad event of the CRM form:

//Schema name of my custom attribute is new_customatt

var CRMvar=crmForm.all.new_customatt.DataValue;


//setting the source of the IFrame here

crmForm.all.IFRAME_Sendvariable.src=’http://localhost:4319/Projects/firstpage.aspx?accname=’+Accname+’&customatt=’ + CRMvar;

Publish customizations and create a new Account. The values can be accessed in the target page.



Nithya Balasubramanian


CRM Accelerators – Part V – Sales Methodologies Accelerator

September 12, 2008 Leave a comment

Sales Methodologies Accelerator – Due to be released in Q3 2008


The sales methodologies accelerator is for customers who work with or want to work with one of the leading sales methodology vendors, including: Target Account Selling (TAS), SPI Solution Selling and Miller Heiman. Each of these vendors has their own distinct software products which need to be integrated with Microsoft Dynamics CRM to provide a holistic approach to sales management.

The sales methodologies accelerator will provide customizations, advice and guidance for customers on how these sales methodologies can be configured, managed and integrated with Microsoft Dynamics CRM 4.0.

Kind regards,

Reuben Krippner

Managing a telemarketing campaign

September 5, 2008 Leave a comment

How do we go about setting up a telemarketing campaign through Microsoft Dynamics CRM? Here is the challenge – we have acquired a list of Companies that we want our telesales team to call, but it is not quite as straightforward as ‘assigning’ a number of the records to each member of the telesales team – as often is the case with telemarketing there are other requirements that come into play:

  • We need to measure ‘activities’ so each and every Phone Call must be recorded
  • Two teams are going to be calling (because of time zone differences they start at different times) – East Coast and West Coast – so we have to be able to determine which records fall into the appropriate classification.
  • Each team consist of ‘temps’ who do not work every day, therefore all calls must sit in Queues – so we have to ‘generate’ Phone Call activities and assign them to the appropriate Queue
  • Each call must carry an ‘Outcome’ (sometimes referred to as a wrap-up code), so we can measure how the campaign is working
  • We have to handle busy signals; wrong numbers; fax numbers; etc. – in this case we need to record a ‘call’ was made but in some instances we want a ‘call back’ (or ‘try again’) Phone Call to be automatically created
  • We require that ‘call back’ phone calls are to be made after the initial run through of all the calls – so they must sit in a separate queue so that they can be easily identified
  • We need to update the Leads (as a result of the call) so we can analyse them effectively

This is by no means an exhaustive set of requirements – just some of the more typical requests I often hear, and it is actually quite straightforward to set this up.

The key in all of this is that we don’t want our telesales operators spending lots of time closing/creating activities and having to think about what to do after each call.

The first we need to do is setup a number of appropriate Queues inside CRM:

We have two ‘primary’ queues for East Coast and West Coast – and secondary queues where the ‘call back’ phone calls will reside.


We the need to add additional attributes to Account and Phone Call entities:

  1. Account

This is not mandatory but it helps us with analysis – to keep track of the status of each account.


  1. Phone Call

The ‘wrap up’ code and Call back Reason. In this instance we are recoding the ‘Previous’ wrap up code – only if it is a follow up call – which is an optional attribute.


And finally, we need to build the Workflow rules:


  1. Generate a Phone Call for each Company



Note, I have added some simple ‘call script’ statements to help the operator. If you are planning multiple campaigns over time you may wish to consider using a campaign code in the subject line rather than a geographic location code.

  1. Move phone call to correct Queue


  1. Generate the follow-up phone call after the ‘Wrap up’ of a call


Note, the ‘Record attributes change’ is based only on the attribute ‘Wrap Up Code’.

  1. Create follow up call – Sub process



Note, I am using a sub process here just to highlight the use of ‘sub processes’ within the workflow context – the same statements could have been directly embedded in the previous workflow rule itself.

The telemarketing campaign should now flow like this:

1. New company added to CRM in LA (West Coast)


2. Phone call automatically created for the Company and moved to the appropriate Queue


3. Telemarketing operator takes the first call in the queue and attempts to call prospect.
Operator updates call with Wrap up code and saves and closes that record – they are then free to move on to the next call. In this case it was a ‘busy’ signal (so we want a call back call to be created).


4. Workflow automatically closes the originating phone call and updates the Company record.



5. Workflow automatically generates a new call back phone call and moves it to the appropriate Call back queue.



6. Phone call activities can now easily be filtered; exported to Excel or reported on using the Report Wizard.


For the purposes of this example I used the CRM object ‘Accounts’ for the telemarketing campaign to be based on – but it could quite easily be Leads or Contacts and the process that I covered in this example can easily be adapted to meet your own specific requirements.

Guy Riddle

Microsoft CRM MVP

Data Migration Manager Tips and Tricks

September 5, 2008 Leave a comment

Here is a write-up to help Data migration Manager (DMM) users who are looking for tips and tricks to improve their experience with DMM.

Boost Data Migration Manger’s (DMM) Performance

1. All the machines in the system must be in the same time zone and use same regional settings.

2. In the Internet Options -> Connections -> LAN Settings, set the physically nearest proxy server and set ‘Bypass proxy server for local addresses’. Do not use the option ‘Automatic Configuration’ as it involves in IL code generation (observed for .NET 2.0 SOAP classes).

3. Dynamics CRM 4.0 application has been launched at least once before testing. 

4. All data file size should be less than 32 MB. If you have a source data file that is over 32 MB, split the data into several files (making sure to include the header row in each file) and migrate them separately.

5. While running DMM, do not load the client with other applications.

6. Preferably do a Test run with lesser number of records before proceeding for actual Data Migration, so that you can undo the migration using DMM if any issue happens.

7. DMM will execute slow in a virtual machine (MS virtual server or Vmware) than a similar configuration real hardware.

8. Instead of using SQLExpress, if you have license to use SQLServer then it is better to use DM Client on the same machine where SQL Server is installed.

9. For an On-Premise Install, DMM and CRM server on different machines would enhance performance. If not, then make sure that the DMM and CRM server are on a fast LAN connection with no TCP routing hops or HTTP proxies in between.

10. The version of the Data Migration Manager must match the version of Microsoft Dynamics CRM to which you are connecting.

11. DMM cannot be run at the same time as Microsoft Dynamics CRM for Outlook. To disable CRM in Outlook :

In the notification area, click the Microsoft Dynamics CRM Application Host icon, and then click Disable CRM.  The icon appears grey.

Microsoft Dynamics CRM will be re-enabled the next time you start Outlook.

12. Turn off tracing/logging for better performance.

13. Upload the file IN ORDER of lookups resolution – if account contains lookups of contact then contact should be selected first and then account, this might save time in determining the order of files to be updated (sorting a sorted array takes less time)

Customize DMM

Can I customize Microsoft Dynamics CRM while DMM is running?

If you run a migration after making customizations in Microsoft Dynamics CRM, you might receive data upload errors. To prevent this, after any change in CRM metadata; user should restart Data Migration Manager to sync metadata customization.

In a particular case, when migrated data is for a custom entity and later using web App, if the custom entity is deleted, then Migration Purge using DMM tool will fail.

To succeed, create the deleted custom entity and retry deletion using DMM tool.

How to create attributes of Date-Time type through DMM?

DMM supports creation of Date type attributes. To migrate data in date-time attribute, create the date-time attribute on the server before beginning migration, and map the source attribute to the newly created attribute.

How to migrate Lookup attributes that Reference a Custom Entity Created by the DMM?

The Data Migration Manager does not support migrating records from other record types that refer to a custom entity that is created by the same migration. If you have other files in this migration with records that refer to this entity, you need to cancel this migration, and instead, do two migrations.

Step 1: Migrate this custom entity in the first migration, and the wizard will create it in Microsoft Dynamics CRM.

Step 2: Migrate data having lookup references that refer to this new entity.

When I use non-English characters in a name for a custom attribute, why do I get an “Invalid characters in name” error message?

DMM uses one input for both the database logical name and the display name, and the database logical name must use ASCII characters.

To work around this problem, after you migrate your data, use the Customization area of Microsoft

Dynamics CRM to change the display name.

When I migrate data to a custom attribute, if DMM fails to create the attribute, the first time, and I reuse the data map from this migration, why does my custom attribute data not get migrated?

If a custom attribute is not created the first time you run an Express mode migration, all data in this attribute will be ignored when you reuse the data map from this migration for another Express mode migration.

To work around this problem, when you start DMM using the data map, use Standard mode, so that you can specify creating a new attribute again.

Migrate Specific Attributes

Are you migrating Date/time format source data? Ensure this –

1. If the date/time format of your source data differs from the one set by you in CRM settings ,then consider changing the CRM format settings accordingly before starting migration. It is advisable to take a small number of test records and verify your expectations before starting migration.

2. Microsoft Dynamics CRM 4.0 Data Migration Manager validates the date data in your source data during migration. In cases where the date data is not in the format specified by your date format setting, DMM displays an error.

3. DMM understands the date time settings of the user in whose context it is running. To change the user timezone in CRM go to ToolsàOptions and change your time zone. To change the date format settings go to ToolsàOptionsàFormatsàCustomizeàDate, change and save the settings. These settings will be used by DMM to migrate the dates and times.

How can I preserve the auditing information like created on while migrating data from my CRM system to Microsoft CRM?

In order to migrate data into the “Created On” attribute, you must map your source column that contains this data to the Microsoft Dynamics CRM Record Created On (overridencreatedon) attribute. As the record is migrated, the Created On date will be updated with this value, and the Record Created On value will be set to the date and time the record was actually migrated.

However for a custom Entity created through DMM, data in the Created On column in the corresponding .Csv file cannot be migrated. To work around this limitation, create the custom entity using the Customization area of Microsoft Dynamics CRM, and then migrate data to the custom entity.

How can I migrate data into the Time Zone field?

For migrating the timezone fields, you need to specify the correct ‘code’ for that time zone in the .Csv file, the list of time zones with repective int values can be found in the DM help file.

How can I map state/status or any Boolean type field?

State/Status/Boolean fields are treated just like picklist fields in CRM and have one or more options associated with them. To migrate data into any of these types of fields, the user needs to define picklist mapping along with the column mapping specified.

E.g. Let’s say that the user wants to migrate data to “DoNotEmail” field of Account entity and the source system has a corresponding field by the name of “EmailAllowed” which takes “true”, “false”, and “not specified” as its possible values. The user will have to create picklist mappings mapping source system’s “true”, “false”, “not specified” values to target system’s Boolean options 0, 1 and 0 respectively. Same is required when a user is migrating data to state/status fields.

<AttributeMap Id=””>





        <PicklistMap Id=””>





        <PicklistMap Id=””>





        <PicklistMap Id=””>

            <SourceValue>not specified</SourceValue>






How to overwrite pick-list mappings (different values) done by “Auto pick-list mapping”?

The DMM gives user an option to customize the CRM system automatically with picklist options that are unmapped. This option will take all the unmapped source picklist values and create pciklist options for them in CRM. The point to note here is that if the picklist value is unmapped only then the pciklist option be added to the CRM system. If the user does not want the CRM system to automatically customize the picklist options for an attribute, then she can create picklist mappings for that attribute mapping all the source picklist options to existing CRM picklist options.

Some records are migrated to Microsoft Dynamics CRM with a default status.

Documented at DMM ReadMe: 94a10260e460e437/Microsoft_Dynamics_CRM_4.0_Data_Migration_Manager_Readme.htm

How can I migrate data to the QuantitySellingOption drop-down list?

Quantity Selling Option is not customizable in Microsoft Dynamics CRM, so if your data has customized values in this column in your .csv file, it will not be migrated. To workaround this problem, you will need to do one of the following:

Manually edit the data map for the migration to map the customized drop-down list (picklist) values in your price list items .csv file to valid Microsoft Dynamics CRM values. The three valid values are No Control, Whole, and Whole and Fractional.

Edit your price list items .csv file and change the custom values to valid Microsoft Dynamics CRM values

Migrate Users

Why doesn’t data from all the attributes in my users .csv file get migrated?

DMM will create new users based on data in a .csv file, but it only migrates the following fields to which you have mapped your source csv columns:

  • Domain logon name
  • First Name
  • Last Name
  • E-mail

You will need to manually enter any other user data.

How to map users and create new users?

Find the details at:


Some of the records might have been migrated despite errors?

For an entity if the attribute customization fails from DMM, then the records for that entity gets migrated except for the column value for which the custom attribute was created.

In this case all the rows will have error as the custom attribute creation failed, but in reality all the records are migrated but only the custom attribute data is not migrated.

Fix this:

1. At the CRM Server side using Web App, user has to create the custom attribute and manually update all the migrated records with required value for this newly added attribute.


2. Resolve all the reported errors in “Conversion error” screen before starting data Upload using DMM.

Encountered “Generic SQL error” during data conversion?

The most probable cause for this error is the field size limit per attribute. In case your attribute data exceeds the limit, opt for field width customizations by ensuring that the checkbox on the Overview screen of DMM which reads as “To accommodate the source data, automatically customize Microsoft Dynamics CRM list values and length of attributes” is checked. However attributes of type “Ntext”, does not support automatic field width customization for attributes with length greater than > 2000. In case of failures, increase the field size by using CRM Application customization and retry to migrate the failed records after exporting the failed records from DMW.

Parsing error: “Row is too long to import”?

Currently there is a limit of 4000 characters on the columns of the data rows in the files used for migration. You will hit above error if any column size exceeds this limit. Here is a workaround:

1. On the machine where you have DMM installed, add a ‘Double’ type registry key called ‘ImportParsedColumnDefaultSize’ with a very large value (like Decimal 10000) under: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Data Migration Wizard

2. On the SQL server which you are using for DMM(or SQL express ) create a database trigger by running the following script:

   2: GO
   4: AS
   5:     DECLARE @raisedEventData XML
   6:     DECLARE @substr XML
   7:     DECLARE @tablename nvarchar(500)
   8:     DECLARE @columnName nvarchar(100)
   9:     DECLARE @sqlstatement nvarchar(1000)
  11:     SET @raisedEventData = eventdata()
  12:     SET @substr = @raisedEventData.query ('data(/EVENT_INSTANCE/ObjectName)')
  13:     SET @tablename = CONVERT(nvarchar(200), @substr)
  16:     declare @i int
  17:     SET @i = 0
  18:     while @i < 24
  19:     BEGIN
  20:         SET @columnName = 'COL' + CONVERT(nvarchar(50), @i)
  21:         if columnproperty(object_id(@tablename), @columnName, 'ColumnId') is not null
  22:         BEGIN
  23:             SET @sqlstatement = N'ALTER TABLE ' + @tablename + N' ALTER COLUMN '+ @columnName + N' nvarchar(max)'
  24:             PRINT @sqlstatement
  25:             EXECUTE sp_executesql @sqlstatement
  26:         END
  27:     SET @i=@i+1
  28:     END
  29: GO

Here is what the script does:

1. Operates on the DB, is independent of CRM code

2. Will convert all columns from COL0-COL24 automatically to nvarchar(max)

3. Will check for existence of columns before resizing

4. Operates on the MSCRM_MIGRATION Database

5. Consider running this only for the parse tables that are failing and then delete the trigger

Why do I get an error “An error has occurred? Please see the log file for more information.” when I try to import a data map?

If you have a value that is too long in a parameter such as SourceName, Name, or SourceEntityName, you will receive this error. The log file will show a “Generic SQL error.” To work around this problem, shorten parameter names in the data map to 160 or fewer characters.

Why do I get error messages about rows with a number greater than the number of rows in my .csv file?

Microsoft Office Excel doesn’t display rows with blank data, so if you look at your .csv files with Excel, you will not see empty rows at the end.

To remove empty rows at the end of a .csv file, open it in Notepad.

Why do I see Data Upload Errors with no description?

If your record has a status of Published, it cannot be migrated. Articles must have a Status value of Draft or Unapproved in order to be migrated. After migrating the articles, use Microsoft Dynamics CRM to change the status of the articles.

For the following queries and many other refer Troubleshooting Guide

  • When I start Data Migration Manager, I see the message “Mandatory updates have not been installed. Data Migration Manager cannot continue.
  • Can’t migrate data for entities (like business unit) which have mandatory self reference
  • How do I enable creating logs that include more details about migration errors?


ReadMe: 94a10260e460e437/Microsoft_Dynamics_CRM_4.0_Data_Migration_Manager_Readme.htm

Troubleshooting Guide:


Sonal Sawhney

CRM Accelerators – Part IV – Enterprise Search Accelerator

September 1, 2008 1 comment
Last week we introduced the Event Management Accelerator which is part of the CRM Accelerators for Microsoft Dynamics CRM customers and partners to be released in the next few months, each week we will unveil more details of each accelerator. In this article we feature the Enterprise Search Accelerator.

Enterprise Search Accelerator – Due to be released in Q3 2008

The enterprise search accelerator allows Microsoft Office SharePoint Server (MOSS) customers to view and search for Microsoft Dynamics CRM data directly from their SharePoint portals.

By combining these two technologies users from different areas of the business will be able to:

  • View and edit any Microsoft Dynamics CRM data such as accounts, contacts, opportunities, sales orders, invoices, service cases and any custom entity data through SharePoint. The Microsoft Dynamics CRM security model is preserved and enforced so that users can only view or edit CRM information that their security role allows.
  • Launch a SharePoint search which can return documents, emails, web content and Microsoft Dynamics CRM data.

The enterprise search accelerator provides one enterprise portal that users can search and view important customer information and documents from several sources within the organization.

Additionally, the technology, Business Data Catalog (BDC), and techniques used with this accelerator can be employed to surface data from other line of business applications to further enrich the SharePoint portal.

The BDC makes it easy for people to connect to, find, and act on information stored in structured line-of-business systems (such as Microsoft Dynamics CRM) by using a declarative framework to securely integrate them into search results.

With the BDC customers and partners can configure actionable audience-specific portals, dashboards and mash-up interfaces for this data without writing any code.

The following image is taken from the beta version of the Enterprise Search Accelerator:


Kind regards,

Reuben Krippner

Thoughts on Forms

September 1, 2008 Leave a comment

Forms, forms, forms…

It’s amazing how much manual data entry we still have to do in what is supposed to be an increasingly automated world.  For a data-intensive application like CRM, the way the application presents and requests data from the user can be pivotal in deciding whether the user actually benefits from the system. 

Take an example from one of the most popular sites today: YouTube. How many fewer videos a day do you think would be uploaded if their submission form was poorly designed?


What is so great about such a plain looking form? First of all, it gets straight to the point: “What do I need to fill out to get this video uploaded?” All of the required fields are lumped in the top section and optional fields are left in the expandable sections below with a summary of what the defaults are set to. Another important thing to note is that most of the labels are immediately obvious but since most users are not familiar with ‘tags’ they’ve provide some more information. Finally, take a look right above the form and you’ll notice that although this is a 2-step wizard they make it very clear where the user is in the process (“Step 1 of 2”).

On the other hand, try registering to vote online. Why do such basic questions seem so complicated?


There are some broad thoughts I’d like to share about how we can improve upon the forms experience have in CRM 4.0 and, of course, please do let me know what you think in the comments.

Forms should show the right information to the right user at the right time
There is usually more information on a typical form in CRM today than most users care to see. What is relevant to one person may be irrelevant to another; however, context is also important think about. In some cases a single person may want to see different views of the same piece of data at different times. Our forms should be smart about what they show who and when.

Forms are about more than just data entry and retrieval

Although the examples above are all about inputting data, in CRM the real value is created when that data is made relevant alongside other related information in the system. This tells users the ‘so what’ about their CRM data and helps them make intelligent decisions beyond just a single account or contact. Our forms should make it easy for users to get insight from relevant and related information that exists elsewhere in the system.

Make it simple to create great looking & easy to use forms

At the end of the day it needs to be easy to make well-designed forms that you want to put in front of your users. Well-designed forms reduce administrative time, increase system adoption and, most importantly, increase the overall quality of data in the system. While there should be flexibility in the tools we offer, they should be focused enough that as a system customizer you don’t need to spend too much time making something that looks great.

(On a side-note, if you’re interested in great form design for your own website, one of my personal favorites is Luke Wroblewski –

As I mentioned, these are just some of my thoughts on the world of forms but, more importantly, I’d be interested to hear your feedback and enhancements you’d like to see in CRM5.


Steve Kaplan

Client Extensions and Scripting Samples in the SDK Part 2

September 1, 2008 Leave a comment

Continuing from my previous blog post Client Extensions and Scripting Samples in the SDK Part 1, I will continue to point out a few of the samples for client extensions and scripting that have been added to the SDK.

In Part 1 I covered the following:

  • Add Customer Address data to the Case record form.
  • Integrate Live Search into your forms
  • CrmService method samples

This time I’ll cover these:

  • Add default form data values using QueryString arguments
  • Create Activity Record Templates
  • How to Control Update Access for a Field
  • Get GUID values for items selected in grids
  • OnSave Event Modes

Add default form data values using QueryString arguments

This was a case where we ‘discovered’ a feature. Back in the days of Microsoft CRM 1.0 I remember a developer on the team showing how field values could be set just by setting querystring parameter values (HTML values) to the URL addressable form. If memory serves, that particular capability was never officially documented or supported. Eventually, I believe a change came along that broke it.

Fast forward several years and as we are working on CRM 4 and I’m asking the PM and the developers about ways to set default values using the Onload event. They asked why I would do that when I can just set the values using querystring parameters. This functionality is what is behind the attribute mapping feature in the application. After clearing this with the testing team, we got approval to go ahead and document this.

For security reasons you can’t pass arbitrary querystring arguments to the form without getting an error. The arguments have to follow a specific naming convention based on the name of the field attribute you want to set. Complex field types require up to three separate parameters to set a value. And Activities don’t support this method.

This capability is documented in the SDK under the topic of Url Addressable Forms and Views. You will have to scroll down a bit to see the information about Passing parameters to set values to new records.

Create Activity Record Templates

Increasing user adoption is all about making it easy for users to quickly and easily perform common tasks. If you want to streamline data entry to support specific process, one way to do this is to provide users with ways to quickly create new records with much of the default data already set. There are a number of ways to do this that are mentioned in the SDK topic Setting Default values.

But I wanted to dive a little deeper into a more problematic scenario. Often times streamlining data entry means creating specific sub-types of a particular activity, a template for an activity where users just have fill in the critical data.

This sample shows how to create buttons on an Account form that provide three different templates for Task records. Each of the tasks records have different default data based on how the button is configured. In this sample they are based on priority; high, normal and low.

Knowing that activities don’t support the ability to set field values using a querystring like other entities, I wanted to show ways to work around for this limitation. Normally a form button configured with the PassParameters attribute can be used to automatically pass values like information about the parent record. But that won’t allow inclusion of custom querystring arguments. The workaround was to pass custom querystring arguments and then include code in the onLoad event to process them. Then, use a Window.opener to query the launching form to get the data about the parent record.

I think this pattern can be used for a variety of different solutions where users need to quickly create different templates for the same type of record

How to Control Update Access for a Field

Probably the simplest Microsoft CRM web service message that can be called from form events is the WhoAmI web service message. This sample simply disables a field on a form if anyone other than the owner of the record views it. I’m sure if you use your imagination you can think of plenty of other ways where it is valuable to know who is viewing any given record.

Get GUID values for items selected in grids

The purpose of this walk through sample is simply to demonstrate how you can create a page that can be launched from a button that is aware of items selected in a grid. This is a basic starting point for many types of actions that can be initiated from the client.

OnSave Event Modes

Did you know that you can detect which button a user clicked to save a form? You might want to apply different logic in your code depending on whether a user is qualifying a lead or disqualifying a lead. Or, you might want to detect whether a user is deactivating or reactivating a record. The Event Mode in the OnSave event will let you detect this without querying the values of the form.


I hope that you found something you didn’t know was in the SDK. If you have any questions or comments about the samples – or ideas about new samples you would like to see. I’d love to hear from you.

Jim Daly