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
moffetmoffet 

How to remove the hyperlink to a formula field of text return type

 I had a formula field in contact of text return type which returns text in the format "salesforce.com" i am getting the result with hyperlink , i want to remove the hyperlink , can any one help?

my formula is 

Account.Domain__c 

prakash_sfdcprakash_sfdc
Just a try, not very sure..

Update the formula as follows:

TEXT(Account.Domain__c)
moffetmoffet
i tried it but it is showing error

incorrect parameter type for function 'TEXT()' Expected number, date, date time pick list received text
Joseph Kennedy 4Joseph Kennedy 4
Hi Moffet, 

I came across your question from 2013 looking for the same answer... I could not find one but I did some experimenting and I found the answer. To return text only and eliminate the clickable hyperlink do the following:

Use the Function: LEFT(text, num_chars). Specify your field that you would like to reference in the text portion and the number of characters after the comma. Should look like this LEFT(XXX__Type__r.Name, 20).

Please let me know if this was helpful!
Megan D MoodyMegan D Moody
Joseph - I'm trying your trick on an email field, but it only works if I truncate the email address itself. If I grab the text of the email, it still does some funky hyperlinking in my formula field. Any ideas? 

LEFT(Email__c,LEN(Email__c))
Joseph Kennedy 4Joseph Kennedy 4
@Megan, 
 
would you mind showing me a screenshot of what the end result looks like? I would love to see the funky hyperlinking you speak of. Off hand before I see the screenshot, do you think it could be the fact that the "@" symbol is showing up and causing your webpage to make it clickable because it think's it's an email address? What browser are you using?
 
Megan D MoodyMegan D Moody
I have a formula field where I'm displaying the first & last name, doing a line break, email address, line break, and phone number. When I view that formula field through a community, it displays like so:

User-added image
Here's the formula for that: 
First_Name__c & " " &  Last_Name__c & BR() &
Email__c & BR() &
Phone__c

I tried creating a formula field called Email_Text__c and having the return type be Text and grabbing the Email__c value (which is an email field), but it still results in the funky formatting. I belive you're correct that it's the existance of the @ symbol in the string and the browser. If I truncate so that the @ isn't displaying, funky formatting gone. However, once the @ symbol is in the string, back to funky formatting. 

Any hack ideas to get around this? 
Christian RotheChristian Rothe
Megan, I found this thread with trying to do the same thing for our marketing team and create a signature block that is stored in Salesforce they can reference in Pardot.  I was fighting the same issue.  Then it hit me, add a space at the end of the line above the email address.

I came up with the following.

RVP__r.FirstName & " " & RVP__r.LastName
+BR()+RVP__r.Title & " "
+BR()+RVP__r.Email  & " " & "|" & " " & RVP__r.Phone
 
Tonnie StapTonnie Stap
In my case this issue resulted in creating links when I converted a Quote to PDF. Adding a trailing space did resolve the issue that a City name is converted to a hyperlink. However, for mail addresses I had to use a different workarond. I created a formula-text field in wich I aggregate the addressing info I want to display. Relevant lines from the formula:

Opportunity.Account.ShippingPostalCode & " " & Opportunity.Account.ShippingCity & " " & BR() &
SUBSTITUTE(SUBSTITUTE(Email, "@","@"+CHR(8203) ) ,".","."+CHR(8203))

The second line will add a trailing "zero-width space" to every @ and . in the mailaddress. These invisible characters prohibit the recognition of the mailadres and thus prevent creation of the mailto link.

Worked for me in the Summer '23 release.

Kind regards,
Tonnie