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
Web UserWeb User 

Accessing a lookup relationship of a lookup relationship!

Good morning,

 

I have a query that I would like to find out if the functionality is available within salesforce.

 

I have 3 objects. One is the country object, (representing a country), I will be populating this with some countries.

 

I also have a resort object, this will have a lookup relationship to the country table as one of its fields.

 

The third object is a quote object, within this object it will have a resort variable that is a lookup relationship of a resort object.

 

To the question :- In my quote page layout, alongside the resort field I want a country field, but not as a lookup relationship, I would like it to simply display the selected resorts country  (if you know what I mean), but can't seem to find a way to achieve this (I want to avoid using another lookup relationship to the country, because then it won't be in line with the resorts country).

 

Quote Page

----------------

Resort Field --> the resort that the quote object is related to

Country Field --> the country that the resort that the quote is related to

 

Thank you for your time,

 

Lloyd

 

I tried to explain this as well as possible, although it was a bit of a tongue twister!

Jake GmerekJake Gmerek

If I am understanding you properly, you could use a function field, type text with the following function:

 

resort__r.country__r.name

 

that should travel up the hierarchy and return the name of the country referenced in the resort record chosen on the quote.

SAPOCSAPOC

You can use formula field that displays country name resort__r.country__r.name .

You can also use workflow to update county field once resort is selected.