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
baruch.obaruch.o 

How to create a formula field with a link to a related list view

Hi !

 

I would like to create a formula field, that would contain a hyperlink, poining to a related objects list view in the same page.

For example, adding a custom formula field to an Account object, that would contain a hyperlink pointing to the related Opportunity objects list.

I see that the link is of the form AccountId#AccountId_Opportunity['AccountId'].Id, but it is not possible to put this in a Formula field, as Account object does not have an Opportunity field.

 

Thank you !

 

Marko LamotMarko Lamot

check how "Show More" link is constructed. And put that in formula.

 

For example: account -> contacts.   If you have more contacts than in your default setting of views; you will get this "show more" link. You can then use this URL to create your formula....

 

Marko LamotMarko Lamot

correction: you should see link "go to list" not "Show More"

baruch.obaruch.o

This is exactly what I've referred to in my original question. I can use this link, but it contais an Id that is not possible to receive in the formula, and I do not want to use it hardcoded in the formula.

I was looking for a solution that would allow me to access the field via the formula variables.

Marko LamotMarko Lamot

there is no way to get the id of the child object lookup (ie related list) in the formula.  this has to be hardcoded in formula.

 

alternativy you may use apex which will allow you to get desired id without hardcoding

 

puneet28puneet28

Hi baruch.o,

This should do.

Please make sure that the return type is TEXT.

This custom formula field is on Account.

 

HYPERLINK("/"+Id+"#"+Id+"_RelatedOpportunityList_target", "Go to Opportunities", '_self')