2

There are 2 custom objects linked to each other via lookup. The requirement is to create a hyperlink formula field in the child record which when clicked should direct to parent record page.Is this requirement possible via hyperlink formula field?

1 Answer 1

6

Create a Text formula field with something like ...

HYPERLINK(
  "/" & Your_LookUp_On_Child__c, 
  "whatever text you want",
  "_self"
)

/* or if you want the record name */

HYPERLINK(
  "/" & Your_LookUp_On_Child__c,
  Your_LookUp_On_Child__r.Name,
  "_self"
)

Note 1: Change _self to _blank if you need the link to open in a new page

Note 2: For standard relationship fields, replace

  • the __c of Your_LookUp_On_Child__c by Id
  • the __r of Your_LookUp_On_Child__r by nothing

Note 3: If it can be empty, use a conditional clause (IF) to show the HYPERLINK if Your_LookUp_On_Child__c is not empty

8
  • What would be the return type of formula field in this case?
    – Return0
    Commented May 6, 2020 at 7:01
  • 1
    @Return0 Just Text should be ok Commented May 6, 2020 at 7:03
  • Then i am getting error as Error: Field $Action.Car__c.View does not exist. Check spelling.
    – Return0
    Commented May 6, 2020 at 7:51
  • Car_Type__c is the field API name of lookup to parent and Car__c is the API name of child object
    – Return0
    Commented May 6, 2020 at 8:00
  • 1
    @Return0 With what I read, your case would be IF(ISBLANK(Car_Type__c),"",HYPERLINK( "/" & Car_Type__c, "Click here", "_self" )) Commented May 6, 2020 at 8:09

You must log in to answer this question.

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