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
Karim BAHAJIKarim BAHAJI 

How to make a lookup filter between Account and Contacts

Hi,

Here is my question : how can we make lookup filter between Account and Contacts in order to find only the contacts of the selected account?

Thanks in advance.
Best Answer chosen by Karim BAHAJI
bob_buzzardbob_buzzard
Here's an example filter that I have on a custom contact lookup field on the opportunity sobject. This ensures that I can only select contacts associted with the opportunity's account:

User-added image

All Answers

bob_buzzardbob_buzzard
Here's an example filter that I have on a custom contact lookup field on the opportunity sobject. This ensures that I can only select contacts associted with the opportunity's account:

User-added image
This was selected as the best answer
Karim BAHAJIKarim BAHAJI
Thank you for your feed back Bob. But i don't have the Account iD in my custom object...
bob_buzzardbob_buzzard
Then you can't do it - the filter needs to work on the current record. If you don't know the account, how can you limit the contacts to that account?
Karim BAHAJIKarim BAHAJI

Yes i understand. For my project, i create a custom object called Goodies with 2 custom fields with a lookup on Account and Contact. Unfortunatly i don't have Merle & Coste :/