Wednesday, December 17, 2008

Opening an Email when double clicking on the email address in Microsoft CRM.

I’ve often been asked by my clients if they can double click on an email address in the contact screen and have it create a new email in Outlook. I found this solution on Michael Höhne from Stunnware’s blog (found here).

Copy and paste the following code in the load event of the contact form:

if (crmForm.all.<name of text field> != null) {
    crmForm.all.<name of text field>.ondblclick = function() {
var email = crmForm.all.<name of text field>.DataValue;
if ((email != null) && (email.length > 0)) {
            window.navigate("mailto:" + email);
        }
    }
}

Replace the <name of text field> with the schema name of your email field. Normally this is emailaddress1.

Users will now be able to open a contact’s record, double click on the email address and it will open a new email in Outlook. They can then make a decision as to whether they want to track the email by clicking on the Track in CRM button. Simple but very effective and most importantly users love it!

I find that I am often on Michael’s blog using his solutions in the Real World. Check it out if you haven’t yet www.stunnware.com!

No comments: