function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
udayar_jayamudayar_jayam 

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:

 

HYPERLINK(
  "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.