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
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
ofYour_LookUp_On_Child__c
byId
- the
__r
ofYour_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
-
What would be the return type of formula field in this case?– Return0Commented May 6, 2020 at 7:01
-
1
-
Then i am getting error as Error: Field $Action.Car__c.View does not exist. Check spelling.– Return0Commented 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– Return0Commented 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