The regular nvarchar attribute with URL format is useless for anything else but link with http/https and ftp/ftps schemes.
To make things worse, if you put in link with a protocol that is not recognized by CRM validation code, http protocol gets automatically appended. So forget about using skype, navision, magnet, msnim or any other URI schemes!
Also, did you notice hot useless Email format is? You can’t click and send an email to address from you default email client!
But there is a simple JavaScript trick that can be used to convert any regular nvarchar field on a form to clickable link field!
We want to turn the link into blue and underline it. Using same CSS style as for build in URL format is not the way to go, since it includes CSS behavior that validates schemes and adds http URI scheme if none is used.
We can recreate the look and feel with just a few lines of code. Put it in OnLoad event and substitute attribute name.
var emailTextBox = crmForm.all.emailaddress1; emailTextBox.style.color = "#0000ff"; emailTextBox.style.textDecoration = "underline"; emailTextBox.attachEvent("ondblclick", openEmail1); function openEmail1() { if (emailTextBox.DataValue != null) document.location = "mailto:" + emailTextBox.DataValue; }
This is end result – colored and underlined email that you can double-click it.
You can change first parameter of attachEvent to “onclick” if you prefer single click.