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
Mayank.msMayank.ms 

Lookup filter to display Contacts related to selected Account

Hi Guys,

I want to display only those contacts that are related to the selected account. I have 2 custome lookup field on opportunity object, one is the referrer account and another one is referrer contact. When we select the lookup account and save it then need to display only related contacts. I have created a lookup filter but its not display contacts by default when click on the contact lookup, see the lookup filter as below

 

 

 

 

 

User-added image

Please help on it

Thanks


 

Best Answer chosen by Mayank.ms
Deepak Maheshwari 7Deepak Maheshwari 7

Hi Kamran,

 

This is the limitation of Salesforce Standard functionality.

This issue is pending on Idea Exchange.

Maybe the issue will be resolved in few next release

 

All Answers

Deepak Maheshwari 7Deepak Maheshwari 7

Hi Kamran,

 

Please use Please use Opportunity:Referring Account in first lookup(field).
and use Refeering Contact:AccountId in last lookup.
 

Mayank.msMayank.ms
Hi Deepak,

Thanks for reply. I have tried this but not working. Also tried Referring Contact: Account: Account ID in last lookup
Deepak Maheshwari 7Deepak Maheshwari 7

Are you applying this lookup filter on Account lookup field or Contact lookup field?

Please apply the lookup filter on Contact lookup field.


In the screen shot, which you have shared just replace the places of fields you entered.

I have tried my org and its working.

Please let me know if you face any issue.

Mayank.msMayank.ms

Yes, I am using it on Contact Lookup field, but blank lookup shows. See the image belowUser-added image


User-added image

 

Deepak Maheshwari 7Deepak Maheshwari 7

Hi Kamran,

 

The account which you have selected. Please click on that and then in the related list please click on any contact record.

After that try on Opportunity record to check whether contact record is visible or not.

Mayank.msMayank.ms
Hi Deepak,

Yes, that account has contact record. When we search the contact by name then it shows but i want to display by default.
Mayank.msMayank.ms
Yes Deepak, When I am click on the referring account and related contact and then go to referring contact lookup then its showing 
Deepak Maheshwari 7Deepak Maheshwari 7

Actually, this is because when you click on Contact look up field. It shows Recently Viewed Records.

Deepak Maheshwari 7Deepak Maheshwari 7

Hi Kamran,

 

Hope this works for you!

Please mark it as a best answer.

Mayank.msMayank.ms
Hey Deepak, 

If contact look up field shows recently viewed records then how to display by default all the contacts of that account
Deepak Maheshwari 7Deepak Maheshwari 7

Hi Kamran,

 

This is the limitation of Salesforce Standard functionality.

This issue is pending on Idea Exchange.

Maybe the issue will be resolved in few next release

 

This was selected as the best answer
Mayank.msMayank.ms
Thanks Deepak for update me on it.
Deepak Maheshwari 7Deepak Maheshwari 7
Hi Kamran,
 
Hope this works for you!
Please mark it as the best answer.
Travis Kolinek 3Travis Kolinek 3
Where is this "idea" that you mention?  I'd like to vote for it.
Alexandra KesmanAlexandra Kesman
You can find and upvote the idea here: https://success.salesforce.com/ideaView?id=08730000000jeVqAAI