How do I create a hyperlink from a company lookup?
From SmartWiki
Revision as of 08:13, 20 June 2013 by Arthur Lathrop (talk | contribs)
Q: How do I create a hyperlink from a company lookup?
A: You need to do the following steps to configure this.
1. Create the following custom fields.
2. Inside the Display Only - Text or System Object field, you will have the following code in the text/link value.
<a href='/s_viewcompany.jsp?companyid=' id='companyLink' target='_blank'></a>
3. Inside the Special - Browser Script field, you will have the following code.
function buttononclick(){ var companyid=document.frmevent.d_cf_1475115.value; if(companyid==null||companyid.length==0)companyid=document.frmevent.cf_1475176.value; var linkObject=document.getElementById("companyLink"); linkObject.href="/s_viewcompany.jsp?companyid="+companyid; linkObject.innerHTML=document.frmevent.cf_1475115.value; document.frmevent.cf_1475176.value=companyid; } document.onmousemove=buttononclick;