locked
Send EMails from Outlook Client (Not CRM 4.0 email form) RRS feed

  • Question

  • Hello,

    We find very inconvenient for users to use the CRM email form to send Emails to contacts in CRM 4.0.

    Is there a way that we can make the Email field opens outlook new message once clicked.

    Thank you

    Monday, August 27, 2012 6:46 AM

Answers

  • Hi,

    Try this instead:

    function openEmail(emailField) {
        var email = document.getElementById(emailField);
        email.style.textDecoration = "underline";
        email.style.color = "blue";
        email.ondblclick = function () { if (email.value != null && email.value != "") { window.location = "mailto://" + email.value; } };
    }

    Replaced the line:
    window.open("mailto://" + email.value);

    with:
    window.location = "mailto://" + email.value;

    If that still doesn't work, try using:
    window.location.href = "mailto://" + email.value;

    Hope that helps!

    -Paul


    • Edited by Paul Nieuwelaar Tuesday, August 28, 2012 6:18 AM
    • Marked as answer by Ehamouda Tuesday, August 28, 2012 5:57 PM
    Tuesday, August 28, 2012 6:17 AM

All replies

  • Hi,

    This functionality comes out of the box now with CRM 2011! However as you're using CRM 4, you can add some JavaScript to your form OnLoad event to simulate the functionality:

    openEmail("<email field name>");
    
    function openEmail(emailField) {
        var email = document.getElementById(emailField);
        email.style.textDecoration = "underline";
        email.style.color = "blue";
        email.ondblclick = function () { if (email.value != null && email.value != "") { window.open("mailto://" + email.value); } };
    }

    You can see at the top you would need to insert the schema name (emailaddress1 for example) into the quotation marks. You can repeat that first line to perform the same action on other email fields, just change the field name at the top.

    Once implemented, simply double-click on the email address field that is blue and underlined to open an outlook email.

    Hope that helps!

    -Paul

    Monday, August 27, 2012 10:19 AM
  • Paul,

    Thank you it worked. but it open a web page as well as an outlook window. any chance we can have it open the outlook only?

    Monday, August 27, 2012 3:49 PM
  • Hi,

    Try this instead:

    function openEmail(emailField) {
        var email = document.getElementById(emailField);
        email.style.textDecoration = "underline";
        email.style.color = "blue";
        email.ondblclick = function () { if (email.value != null && email.value != "") { window.location = "mailto://" + email.value; } };
    }

    Replaced the line:
    window.open("mailto://" + email.value);

    with:
    window.location = "mailto://" + email.value;

    If that still doesn't work, try using:
    window.location.href = "mailto://" + email.value;

    Hope that helps!

    -Paul


    • Edited by Paul Nieuwelaar Tuesday, August 28, 2012 6:18 AM
    • Marked as answer by Ehamouda Tuesday, August 28, 2012 5:57 PM
    Tuesday, August 28, 2012 6:17 AM
  • Thank you the following worked

    openEmail("emailaddress1");
    
    function openEmail(emailField) {
        var email = document.getElementById(emailField);
        email.style.textDecoration = "underline";
        email.style.color = "blue";
        email.ondblclick = function () { if (email.value != null && email.value != "") { window.location.href = "mailto://" + email.value; } };
    }
    

     
    Tuesday, August 28, 2012 5:58 PM