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
jason.bradleyjason.bradley 

Limit the results of an inputField's lookup button to a certain account

Hello,

 

I have an inputField set to a lookup relationship of type Contact. When the lookup button next to the inputField is pressed, it returns every contact that matches up with the name entered. I want to limit the results of that search to contacts with a specific account value. Basically what I'm trying to accomplish is to allow the user to select the contact record of the person that is escorting a visitor into our workplace. It wouldn't make sense that they could select someone that doesn't work at the company as an escort.

 

Can I do this in some way?

 

I thank anyone that can help.

Best Answer chosen by Admin (Salesforce Developers) 
Chamil MadusankaChamil Madusanka

You can accomplish your requirement from lookup filters. Refer the following link for understand defining a lookup filter.

 

http://login.salesforce.com/help/doc/en/fields_lookup_filters_defining.htm


If you got the answer from this post, Please give a Kudos.

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

All Answers

Chamil MadusankaChamil Madusanka

You can accomplish your requirement from lookup filters. Refer the following link for understand defining a lookup filter.

 

http://login.salesforce.com/help/doc/en/fields_lookup_filters_defining.htm


If you got the answer from this post, Please give a Kudos.

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

This was selected as the best answer
jason.bradleyjason.bradley

Thanks! That looks to be exactly what I was looking for!

 

Thanks for the tip in regards to kudos too, I hadn't even noticed that yet.