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
Steven Vawdrey 13Steven Vawdrey 13 

I need to convert a custom text field value to display as a link

We have a custom text field called Master Tracking Number that represents the tracking number used by UPS, FedEx, etc. I would love to be able to display this value as a link so that our users can click on the link which takes them to the link details. So, while the value of this field should display as 123ABC456DEF (unique number for each sales order) I would like the link to point to: https://www.google.com/#q=123ABC456DEF

Is this possible?
Best Answer chosen by Steven Vawdrey 13
Chris Gary CloudPerformerChris Gary CloudPerformer
Apologies if my answer was not detailed enough.
This solution consists of creating two fields. The first field will be a text field that will contain the master tracking number - nothing else. This field will be populated via workflow, integration, etc., however, the Master Tracking Data is inserted into the field, that is how the data is imported.
The second field is a formula text field that will utilize the first field. Within the formula, you will also use the HYPERLINK function. There are two fields that are required, the third is optional. The First field is the URL. This will be the portion of the HYPERLINK that we will use the first field. the first parameter should look like the following: 'https://www.google.com/?q=' & <MasterTrackingField> . The second field is the actual text that will show up for the Hyperlink.  For example, if your Tracking Field API Name is TrackingFieldNumber__c and on a particular Record it has the value of ABC123, then your formula would look like HYPERLINK('http://www.google.com/?q=' & TrackingFieldNumber__c,TrackingFieldNumber). When looking at the page detail the hyperlink would be the ABC123 that is clickable. 
I hope this helps you.
Once you have solved you problem, please mark a comment as 'Best Answer' (even if its not this one). This marks this question as solved and helps the community!

All Answers

Chris Gary CloudPerformerChris Gary CloudPerformer
Yes - you can - you need to create a formula text field  on your Object and use the HYPERLINK formula function. more information on how to use the HYPERLINK formula can be found here - https://help.salesforce.com/articleView?err=1&id=customize_functions_a_h.htm&siteLang=en_US&type=0. - its the last function on this help page.

Once you have solved you problem, please mark a comment as 'Best Answer' (even if its not this one). This marks this question as solved and helps the community!
Steven Vawdrey 13Steven Vawdrey 13
I’m unable to figure out appropriate syntax using the HYPERLINK formula. Based on the description of this formula type, I can’t use this on a value that comes via Workflow rules or field updates. Is that correct? The value of our custom field is populated via a sync with NetSuite.
Chris Gary CloudPerformerChris Gary CloudPerformer
Apologies if my answer was not detailed enough.
This solution consists of creating two fields. The first field will be a text field that will contain the master tracking number - nothing else. This field will be populated via workflow, integration, etc., however, the Master Tracking Data is inserted into the field, that is how the data is imported.
The second field is a formula text field that will utilize the first field. Within the formula, you will also use the HYPERLINK function. There are two fields that are required, the third is optional. The First field is the URL. This will be the portion of the HYPERLINK that we will use the first field. the first parameter should look like the following: 'https://www.google.com/?q=' & <MasterTrackingField> . The second field is the actual text that will show up for the Hyperlink.  For example, if your Tracking Field API Name is TrackingFieldNumber__c and on a particular Record it has the value of ABC123, then your formula would look like HYPERLINK('http://www.google.com/?q=' & TrackingFieldNumber__c,TrackingFieldNumber). When looking at the page detail the hyperlink would be the ABC123 that is clickable. 
I hope this helps you.
Once you have solved you problem, please mark a comment as 'Best Answer' (even if its not this one). This marks this question as solved and helps the community!
This was selected as the best answer
Steven Vawdrey 13Steven Vawdrey 13
This worked perfectly! Thank you so much for the detailed explanation for solving this issue. I appreciate your time and efforts in helping me!
Chetan Kamble 1Chetan Kamble 1
This is very simple you need the 2 fields one which holds the Id of the record and second formula with hyperlink which will hold the name you want to display as link.
Eg,
HYPERLINK("/"& RecordId__c,  Account.Name) In this the RecordId__c has the id of the account. And Account.Name has the name which you want to display on detail page. Use HYPERLINK("/"& RecordId__c,  Account.Name) this value as formula in formula field.