Create JavaScript webresource, put in it following code, call OnLoad method during loading of form of your entity:
function OnLoad()
{
Transform("new_name");
}
function Transform(fieldid)
{
var c = document.getElementById(fieldid);
if (c == null)
return;
c.style.textDecoration = "underline";
c.style.color = "blue";
c.style.cursor = "hand";
c.ondblclick = function()
{
window.open(Xrm.Page.getAttribute(fieldid).getValue());
};
}
Field has to be simple text type. Replace new_name with field you want to transform. Result for my case:
This script Works very fine...
ReplyDeleteThank you very much Andrii.
You are welcome, Suresh. I am trying to do something that works.
ReplyDeletehi'
ReplyDeletei used the same code to open a file from CRM online... could open any website but cant open file from my pc..any pointers?
br
irf
solved!
DeleteWhat did you do to solve the problem? I'm having the same issue. It makes it into a link but won't get to my network drive. All URLs work fine.
DeleteThis doesnt work, does it only work in certain versions of IE?
DeleteThis works for me and for several other users who tried this code so it seems that issues on your side. what environment do you have - CRM Onpremice or online, what is the version of IE?
Delete