Tricks and Tips from Users of Microsoft Dynamics CRM

Updated: January 8, 2008

This place is for the community to share best practices and tips about using Microsoft Dynamics CRM 1.0 to 3.0. (To submit tips about Microsoft Dynamics CRM 4.0, please see the Resource Center in the product.) The information on this page is provided from users to users. If you are looking for help and don’t find what you need here, see Related Links for links to the Community, newsgroups, and troubleshooting articles.

Note that some tips refer to features or functionality that is available only in Microsoft Dynamics CRM client for Microsoft Office Outlook. If you don’t have this client installed, you won’t be able to use those tips.

The solutions suggested here have not been tested or verified by Microsoft, and may be unsupported. For more information, see Terms of Use.

Inspired? Submit your own tip.

*
**
**

Checkbox columns in grid

Submitted by: creativesolutions.ro in Bucharest, RO

Microsoft Dynamics CRM version: 3.0

Categories: Customize

Here's a tip about how to increase the usability of a grid: transform a read-only column bound to a boolean field into an active checkbox column. On grid load, add a DHTML code which transforms each cell content in the boolean column into a checkbox control and sets its value accordingly. Attach an OnChange event on checkboxes controls so that you can call a client-side code or server-side webservice to update the data behind. See here a snapshot of this implementation in production: http://www.creativesolutions.ro/img/Customizations-GridCustomColumn.jpg

Mail merge for custom entities

Submitted by: Ron Auger in Highlands Ranch, CO

Microsoft Dynamics CRM version: 3.0

Categories: Customize

A common complaint of CRM 3.0 is the email templates can only be associated with system entities. CRM 3.0 does not natively support doing mail merge with data from custom entities. You can accomplish this with a PreCreate callout on the email entity. First, Create an email template associated with an Account, Contact or other system entity with the email template editor, using the std facility in the editor for inserting attribute data from the system entity.

You will notice the "slugs" for the inserted data have the format {!Account:accountnumber} and are yellow. Insert slugs of your own different format to reference attributes of your custom entity, for example {new_customentity:createdon}. Note the lack of the "!" and the fact that it is not highlighted in yellow. When CRM instantiates an email from this template, your own slugs will be left alone as plain text while CRM will merge data from the associated record into its slugs. If the email has the regardingobjectid and regardingobjecttype referencing a custom entity, you can use that in a PreCreate callout on the email entity, replacing your own slugs with data you retrieve from the “Regarding” custom entity. The email PreCreate callout can be as simple or complicated you want, supporting as many attributes and custom entities as necessary.

If the email has the regardingobjectid and regardingobjecttype referencing a custom entity, you can use that in a PreCreate callout on the email entity, replacing your own slugs with data you retrieve from the “Regarding” custom entity. The email PreCreate callout can be as simple or complicated you want, supporting as many attributes and custom entities as necessary.

CRM Grids count

Submitted by: creativesolutions.ro in Brussels

Microsoft Dynamics CRM version: 3.0

Categories: Customize

There is a possibility to count and display the total number of records of a CRM grid: a custom code should execute the view behind the grid and count the whole resultset; the count will be shown by a client-side customization. See this approach in production: http://www.creativesolutions.ro/samples.html

Keyboard Shortcut to Form Assistant

Submitted by: Byron & Warren - Johannesburg

Microsoft Dynamics CRM version: 3.0

Categories: Self-Help and Troubleshooting

When you've opened up an Activity/Opportunity for example and you need to quickly open up the Form Assistant on the right hand side of the window pane, press the following keys to activate it: 'Ctrl + Shift + F'. That's sure to save you a split second or two :)

Show Shared Exchange Calendar

Submitted by: Andre Lage in Porto - Portugal

Microsoft Dynamics CRM version: 3.0

Categories: Developer Documentation

One big problem is sharing calendars and make quick access with to low clicks, when you are on phone. To workaround i create a pop-up in activity phone to a html page that make calendar views in outlook, make simple and fast. litle example without <>

object classid="clsid:0006F063-0000-0000-C000-000000000046" id="OVCWPQ1" width="100%" height="485px" param name="Folder" value=[Folder to shared calendar in exchange]/ param name="Namespace" value="MAPI"/ /object

Report to Show Potential duplicates

Submitted by: GY in Nashua

Microsoft Dynamics CRM version: 3.0

Categories: Reporting

Here is the SQL behind a Report I designed to show Duplicate Leads. You can increase or decrease the number of hits by changing the number of characters in the Left Functions. There are slight modifications if you want to find Duplicate Contacts.

SELECT firstname, lastname, address1_city AS City, LEFT(firstname, 4) + LEFT(lastname, 4) + LEFT(address1_city, 5) AS Dup_Add, COUNT(*) AS Num

FROM FilteredLead

GROUP BY firstname, lastname, address1_city, statecode

HAVING (COUNT(*) > 1) AND (NOT (firstname IS NULL)) AND (NOT (lastname IS NULL)) AND (statecode = N'0')

ORDER BY lastname

Reduce Exchange traffic with CRM

Submitted by: IS Partners South Africa in Johannesburg

Microsoft Dynamics CRM version: 3.0

Categories: Configure

To reduce the Exchange traffic on your system, the Microsoft Dynamics CRM Team Blog recommend to customers that they modify their Outlook rule to forward only those messages where CRM:* is in the subject or body. This will eliminate the forwards to the sink mailbox that are just going to get deleted anyway. Here are the steps to modify your rule:

1.

In Outlook, go to Tools > Rules and Alerts

2.

Select the current CRM forwarding rule and click the Change button and choose Edit Rule Settings

3.

In Step 1: Select conditions, check the option for “with specific words in the subject or body”

4.

In the Step 2 box, edit the specific words to be “CRM:”*

5.

Click Finish to save the rule. Please note "CRM" needs to be changed per customer.

CRM Navigation - Return to Parent Tab

Submitted by: seel in Lewistown

Microsoft Dynamics CRM version: 3.0

Categories: Customize, Other

Browsing around the CRM, I've found it helpful to modify the way IE7 handles closing tabs. By default when you have multiple tabs open and close one in the middle it will jump to the next tab (to the right). With opening multiple tabs in CRM and using 'save and close' on a record, IE7 will jump to the next tab to the right, rather than coming back to the one we want - the last tab used (generally the first to the left of the tab we are closing). Here are the steps to activate this setting: In Internet Explorer 7: Open Tools, Click Internet Options. Click on the Advanced Tab. In the browsing options, check "Use most recent order when switching tabs with Ctrl+Tab" Click OK

Simplify sharing of opportunities (Or any entities) with direct e-mailing links

Submitted by: Jonas in Stockholm

Microsoft Dynamics CRM version: 3.0

Categories: Customize

Email your record directly by clicking the "Email link button" on your form. http://blogs.msdn.com/jonasd/archive/2007/04/19/simplify-sharing-of-opportunities-or-any-entities-with-direct-e-mailing-links.aspx

Reposition and Resize Pop-up Windows

Submitted by: GY in Nashua

Microsoft Dynamics CRM version: 3.0

Categories: Customize

Are you always repositioning and resizing your Popup windows to display all of your information? Standardize the way your Popups open!

1.

Go to Settings - Customization

2.

Choose the Entity (Ie. Contact)

3.

Choose the Form - The Main Application Form

4.

Choose Form Properties

5.

Choose On Load and Edit

6.

Click the Event is Enabled box

7.

Add the following in the box: //

8.

Resize the default Window Size window.resizeTo(1000,760) window.moveTo(5,5)

You can Preview the Create Form right there to see how it works Don't forget to Publish it for others to see it work

Editor’s Note: Another user suggested that the last 2 steps above may not work for everyone. Here is a possible revision for step 7 (which also absorbs step 8):

7. Add the following in the box:

// Resize the default Window Size

window.resizeTo(1000,760);

window.moveTo(5,5);

Entering Dates

Submitted by: Laurence R. in Toronto

Microsoft Dynamics CRM version: 3.0

Categories: Other

As most are already aware, it is faster and easier to populate a date field by manually typing in the date instead clicking on the calendar button. What most people don't know, is that you only need to type in the month and day and CRM will auto-populate the year* once you tab to the next field. *CRM will fill in the current year if the month/day has not yet passed. It will fill in the next year if the month/day has already passed for the current year.

Display related entities on a Form

Submitted by: M. M’ller

Microsoft Dynamics CRM version: 3.0

Categories: Configure, Customize

Refering to the Article Display related contacts on your account I have a correction The right Code to display a Contact Tab on the Account Form would be.

var navContact; navContact= document.all.navContacts; if (navContact!= null) { navContact.style.display = "none"; document.all.IFRAME_ContactFrame.src= "/sfa/accts/areas.aspx?oId=" + crmForm.ObjectId + "&oType=1&security=852023&tabSet=areaContacts"; } else { alert("navContactNot Found"); }

Important is oType=1 for Account and oType=2 if we are on the Contact Form.

Some more Names of Areas which could be displayed: areaAct areaActivityHistory areaSubAccts areaContacts areaRelationships areaOpps areaQuotes areaOrders areaOrders areaService areaContracts

Display related contacts on your account form

Submitted by: Dave in Bristol

Microsoft Dynamics CRM version: 3.0

Category: Customize

Some users like to display related forms on their main account form. To display related contacts you can:

1.

Create an iframe on the account page and name it "ContactFrame" (no quotes).

2.

Set the URL to "about:blank" (no quotes).

3.

Tick "Pass record object-type code and unique identifier as parameters".

4.

Remove the tick from "restrict cross frame scripting" in the account OnLoad event use the following JavaScript:

var navContacts; navContacts = document.all.navContacts; if (navContacts != null) { navContacts.style.display = "none"; document.all.IFRAME_ContactFrame.src="/sfa/accts/areas.aspx?oId=" + crmForm.ObjectId + "&oType=2&security=852023&tabSet=areaContacts"; } else { alert("navContacts Not Found"); }

Multiple Column Sort

Submitted by: kSk in Bellevue

Microsoft Dynamics CRM version: 3.0

Categories: Sales

Have you anytime wondered how to sort multiple columns on a Entity Grid view. It's Quite simple.

1.

Click on the first column header

2.

Hold down "shift" key

3.

Click on the second column header

Now you will have second column as the sub-group of first column. Note: You can sort any number of columns till you get the right data groups. Happy MSCRM

Count records

Submitted by: Irene in Redmond

Microsoft Dynamics CRM version: 3.0

Categories: Sales

Need an easy way to count your leads or other type of records?

1.

In any view, click Export to Excel, select Static worksheet with records from all pages in the current view, and then click Export.

2.

In the File Download box, click Open.

3.

Look at the line number of the last line that contains data in the Excel file.

Small JavaScript Snippets to do common tasks

Submitted by: Stunnware in Grasbrunn, Germany

Microsoft Dynamics CRM version: 3.0

Categories: Customize

Sometimes a few lines of code can greatly enhance the user experience. However not everyone considers himself a developer. If you want to start with some basic code examples, open "The JavaScript snippets directory" at http://www.stunnware.com/crm2/topic.aspx?id=JS13. It contains more than 60 samples on how to use JavaScript in CRM 3.0.

Fitting Three Fields Across a Form

Submitted by: Senuk in Worcester, England

Microsoft Dynamics CRM version: 3.0

Categories: Configure, Customize

If you want to put three fields alongside each other on a form you have to remember to do the following:

1.

Add a new section

2.

Enter the section name

3.

Change to the formatting tab

4.

Change the section layout to "Variable Field Height"

5.

Select Three Columns

6.

Click OK

7.

Add fields as required

Uses multiple advanced finds

Submitted by: Nicolas F hrs

Microsoft Dynamics CRM version: 3.0

Categories: Configure, Customize, Sales, Self-Help and Troubleshooting, Other

If you want to use multiple advanced finds in daily business (e.g. your tasks today, appointments this week) then you can use the following link in your internet explorer: http://CRMSYSTEM:PORT/AdvancedFind/AdvFind.aspx?

Use a 'hidden' form tab for hiding fields

Submitted by: Nicolas F hrs

Microsoft Dynamics CRM version: 3.0

Categories: Configure, Customize, Self-Help and Troubleshooting, Developer Documentation, Other

You want to hide fields in a form? Now you don't have to hide every field, now you can move them on the 'hidden' tab and that's all! If you want to use fields in a form without them beeing displayed (e.g. calculating background fields, system required fields) you can now hide them if you create a tab 'hidden' and use the following code in the on-load event of the form:

/* Microsoft Dynamics CRM Hide Tab "hidden" A */ var tabName = "hidden"; var spans = crmForm.getElementsByTagName("span"); for (var i=0; i<spans.length; i++) { var span = spans[i]; if (span.innerText == tabName) { span.style.visibility = "hidden"; } } /* Microsoft Dynamics CRM Hide Tab "hidden" E */

Customisation – If Form type =

Submitted by: Adrian in Sydney

Microsoft Dynamics CRM version: 3.0

Categories: Customize

Its often useful to execute some Form code depending on the form type - for example, only 'on create'. Put this code in the 'OnLoad' event of the Case form. var CRM_FORM_TYPE_CREATE = 1; switch (crmForm.FormType) { case CRM_FORM_TYPE_CREATE: alert("This is a create form."); break; } Create Form = 1 Update Form = 2 Read Only Form = 3 Disabled Form = 4 Quick Create Form = 5 Bulk Edit Form = 6

Change the 'Regarding' on a history email

Submitted by: Adrian in Sydney

Microsoft Dynamics CRM version: 3.0

Categories: Self-Help and Troubleshooting

Change the Regarding on a History email.

1.

Simply go into the opportunity (case, whatever) and delete the email from the history within CRM

2.

Go back to outlook, highlight the email (do not open) and then press "track in CRM" button. CRM will say that the email is already being tracked in CRM and would you like to make another copy. Answer Yes.

3.

Now when you double click the email you will notice that the regarding field is cleared and you can now re associate it to the correct opportunity etc..

Extreme use of filtered views

Submitted by: MatteoSp

Microsoft Dynamics CRM version: 3.0

Categories: Developer Documentation

I think I wrote something interesting about filtered views, xml Sql Server capabilities and xml serialization. It's something more than a tip, full explanation in my blog post: http://sharpreflections.wordpress.com/2007/04/06/dynamics-crm-as-development-platform-transparent-substitution-of-crmservice-with-filtered-views/

Keep a link with the origin of data

Submitted by: Ronald Lemmen in Amsterdam

Microsoft Dynamics CRM version: 3.0

Categories: Deploy, Other

This is a very logical, but often forgotten tip regarding Data Migration. When you are migrating data into MS CRM, then make sure that you also add a field to CRM which references the same record in the original database. This does allow you to confirm that the data migration was succesfull and also allows you to change data on a later time based on user feedback.

Spell-check MS CRM by using tabs for browsing

Submitted by: MSCRM User in Bristol, UK

Microsoft Dynamics CRM version: 3.0

Categories: Configure, Self-Help and Troubleshooting, Other

You can spell check e-mails in MS CRM browser client without needing an add-on. If you are using a Google toolbar or similar with the spellcheck button, this will perform spell checking for you. If your CRM e-mail windows are still popping up without toolbars, all you need to do is make a small change in the IE7 settings: Go to Tools, Internet options, General. Click on the Tabs Settings button, and check the "Always open pop-ups in a new tab" radio button. Job done, all the e-mail windows you open will now be contained within the bigger IE7 window with its toolbars, address bar (which is also very handy at times), and spell checking button. http://crmuser.blogspot.com

Go direct to specific views in Microsoft Dynamics CRM

Submitted by: MSCRM User in Bristol, UK

Microsoft Dynamics CRM version: 3.0

Categories: Customize, Self-Help and Troubleshooting, Other

If there is a particular view you like, and would always like to have open in it's own window or tab whilst working on other views, browse to it in Outlook. Right click on the folder and select properties. Under the homepage tab, you will see and address that looking something like this: http://localhost:2525/_root/stage.aspx?url=%2Fworkplace%2Fhome_workplace.aspx&id=nav_queues. That is the address of the view you want, but would only work when you are local. To make it work when remote from the office, delete the http://localhost:2525/ bit and replace it with the normal URL of the website that hosts CRM. When you plug this into the address bar of IE the view opens straight up. Now set as a homepage tab... http://crmuser.blogspot.com

Save as completed – quicker than closing activities

Submitted by: MSCRM User in Bristol, UK

Microsoft Dynamics CRM version: 3.0

Categories: Self-Help and Troubleshooting, Other

Especially useful for creating an activity that you've already completed - like a phone call you didn't plan for: There is no need to create, save, close, and then save an activity again. Just start a new one, and then go to the file menu and select "save as completed".

Move the Notes

Submitted by: The CRM Lady in Norwich

Microsoft Dynamics CRM version: 3.0

Category: Configuration

To avoid the "ignore other tabs" syndrome, which causes the team to not enter notes on a contact, move the notes to the bottom of the contacts General Tab. You can't delete notes, but you can move them. Of note you might not want to do this if your security is limited to people who have rights to see the account, but not the notes or a more multi-layered and more complex environment.

Detect selected tabs

Submitted by: Dave in Bristol

Microsoft Dynamics CRM version: 3.0

Category: Developer Documentation

You can establish that a tab has focus using the following JavaScript in the onload event of your form:

crmForm.all.tab0Tab.onclick = function() { alert("Tab 0 clicked"); } crmForm.all.tab1Tab.onclick = function() { alert("Tab 1 clicked");

How to send a link to a record

Submitted by: Derik in Redmond

Microsoft Dynamics CRM version: 3.0

Categories: Marketing, Sales, Service

Here's a quick and easy way to send a link to a Record to a fellow CRM user:

1.

Open the Record that you want to send

2.

Press F11 to takes the window into full screen. You'll now be able to see the URL in the address bar.

3.

Select the URL in the Address Bar and Press CTRL+C to Copy.

4.

Open a new email message and paste in the URL (or edit text to insert a hyper link) Voila!

Did you know, multiple windows?

Submitted by: The CRM Lady in Norwich

Microsoft Dynamics CRM version: 3.0

Category: Sales

Did you know you can open multiple windows running different parts of MS Dynamics CRM, all at the same time. This multi-tasking feature is not often found in other CRM systems.

New Accounts

Submitted by: The CRM Lady in Norwich

Microsoft Dynamics CRM version: 3.0

Category: Sales

To avoid entering the address on both a account record and the new contact record do one of the following: 1) either enter the account first, then open the account to add the contact (notice the address is auto-populated) OR 2) Enter the Account details in leads and immediately convert it to an Account and Contact record. This automatically also creates the link between the parent and child records.

Quick way to enter contact addresses

Submitted by: Cynthia in Kirkland

Microsoft Dynamics CRM version: 3.0

Category: Sales

If you have many contacts at the same company and don't want to have to type in each address separately, you can auto create the addresses if you first create an Account Record. Once you create an account record and enter the address data, then under Details, select Contacts. Click New Contact. You'll notice that the Parent Customer information is automatically linked. In addition, if the Account record contained data for the Business Phone field and Address area, then the information is already filled in.

Assign Entity Workflow Solution

Submitted by: usingchris in Durban

Microsoft Dynamics CRM version: 3.0

Category: Customize

Creating a workflow with some pretty standard requirements which did not seem to be able to be handled by the workflow manager led me to explore the world of workflow callouts in CRM - Now there is some serious power!

1.

Requirement 1: Create a workflow rule that is initiated when an opportunity is assigned to a different user.

2.

Requirement 2: Notify the new owner via email that the opportunity has been assigned to them

3.

Requirement 3: Ensure that the notification email comes from the user reassigning the opportunity

4.

Requirement 4: Ensure that the notification email has the user reassigning the opportunity’s name in the signature

Simple requirements it would seem, however even a simple and common requirement like this cannot be achieved by using the workflow manager alone. Why you ask? Well lets see:

1.

Limitation 1: You cannot specify the from address for a workflow “Send E-mail” action. Fine, perhaps this is because the system assumes that the from email address will always be that of the current system user (The person reassigning the workflow in this case.)

2.

Limitation 2: The assumption made above is incorrect as the workflow engine assigns the new owners email to the from address as well as the to address. Hmmm…

3.

Limitation 3: Only the Owner object tokens are available for insertion into the email body, well guess what, the owner is always the new owner so you could never access items belonging to the current user.

Anyway, here is my solution.

1.

Create a new .NET class library project (using the 1.1 not 2.0 framework)

2.

Create a method that accepts the following parameters string WebServiceURL string SMTPServer string LogFilePath Guid senderId string senderType Guid opportunityId

3.

Use the senderId to look-up a system user (this will be the person the opportunity is being assigned to)

4.

Use the opportunityId to get an instance of the opportunity entity

5.

Lookup another system user using the modifieby id of the opportunity (This will be the person reassigning the opportunity) Now you have access to all attributes of the current user, new owner and opportunity

6.

Use the System.Web.Mail object to send the email

7.

Create a workflow rule and callout to this assembly

8.

Some Notes Use the LogFilePath to write as much as possible to a log-file for debugging purposes. Use the WebServiceUrl to always set the correct path for the CRM web service (makes for easier deployment).

Ok, so there is a fair bit of coding that goes with this solution so if you would like to see it drop a comment and Ill send you some snippets. When I get some spare time I would like to look into using the Bulk Email Service to send emails from an assembly that utilse CRM’s email templates.

Editor’s note: There is currently no Comment feature available on this page.

Customizing with partners

Submitted by: Irene in Bellevue

Microsoft Dynamics CRM version: 3.0

Category: Customize

Get a partner to customize your installation of CRM. It will save you time and eventually training dollars.

Reporting and SBS 2003 R2

Submitted by: Irene in Bellevue

Microsoft Dynamics CRM version: 3.0

Category: Reporting

If you're using SBS 2003 R2, know that you will be missing some key reporting features like scheduling reporting. You might want to purchase the Enterprise or Standard edition of SQL Server 2005 so that you can have full reporting features. For example, you can't schedule reports, and the reports can't be exported to a bunch of different formats.

Inspired? Submit your own tip.



Was this information useful?