0

I have Account text (extracted from contact) and want to make a hyperlink to refer to the account. (I used this code(from Eric Praud) to make a hyperlink from Owner text :

HYPERLINK("/lightning/r/"& OwnerId &"/view", BLANKVALUE( Owner:Queue.QueueName, Owner:User.FirstName &" "& Owner:User.LastName)) )

4
  • In fact, I have a custom object, in which by selecting a Contact, I want the Email and Account are auto-populated(and be clickable). The email is easily there, by putting(Contact__r.Email) in the formula of email field, but I can not use the same for account, and the closest thing is (Contact__r. Account_Name_Text__c) which is just a text and not hyperlink Apr 28, 2022 at 16:33
  • Are you trying to achieve this in standard page layout?
    – Sneh
    Apr 28, 2022 at 16:35
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Apr 28, 2022 at 16:42
  • @Sneh yes, I created a custom object, it has fields : Contact, Account, Email, ... . And I am using all in default page layout Apr 28, 2022 at 16:55

1 Answer 1

0

Based on your comments, Create a new formula field (type Text) or change your existing Account_Name_Text__c field and try this :

HYPERLINK("/" & Account__r.Id, Account__r.Name)

Enjoy !

2
  • Yes, it works. As I do not have a direct field of accout and it is dependent to contact and I want to extract account from contact, I changed it to : HYPERLINK("/" & Contact__r.AccountId, Contact__r.Account_Name_Text__c) Thanks a lot. Apr 28, 2022 at 21:08
  • @HosseinDehghan Glad to hear, please select my reponse as best answer
    – Yaac0
    Apr 28, 2022 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .