Here's a simple JavaScript customization to enable an e-mail field, once filled in, have a user double-click it and open your default e-mail client with the address in the "To" field.
if(crmForm.FormType == 1 || crmForm.FormType == 2)
{
crmForm.all.emailaddress1.ondblclick = function()
{
var email = crmForm.all.emailaddress1.DataValue;
if ((email != null) && (email.length > 0))
{
window.navigate("mailto:" + email);
}
}
}
Now if you want to make CRM open an e-mail activity instead of the default e-mail client, you can use the following code (when sending the email, CRM will use email address 1 regardless of what field was dobule clicked):
if(crmForm.FormType == 1 || crmForm.FormType == 2)
{
crmForm.all.emailaddress1.ondblclick = function()
{
var email = crmForm.all.emailaddress1.DataValue;
if ((email != null) && (email.length > 0))
{
window.execScript(locAddActTo(4202))
}
}
}