+ Start a Discussion

How do I create a clickable field in opportunity

Hi All,

     I want to create an url-field within the Opportunity page that contains value an url that in concatinated. 

It should combine a html-textstring and add FirstName + underscore + LastName+Space+Description  in one string, something like this

           Just like this:john_smith Hydrocarbon Area Remediation Mar13.

how to resolve this issues

Best Answer chosen by Admin (Salesforce Developers) 
Shannon HaleShannon Hale

You can create a hyperlink field passing in the fields as a query string parameter something like the following:


  "http://yoururl.com?yourparameter=" + firstnamefield + "_" + lastnamefield + " " + descriptionfield, 
  "friendly text" 


However, you can't use Opportunity Description in a formula because long text area fields aren't available in formulas, and you can't get the first and last names from a contact associated with the opportunity within a formula because they're associated using a ContactRole, which is a child (junction) object.


You can use a workflow field update to copy the first 255 characters of the Description field into a custom text field, and use that for your description, if that's enough. The formula in the field update would be:


LEFT(Description, 255)


You'll need a trigger to copy a contact's first/last name to custom fields on the opportunity so that you can access them from a formula.