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
MATTYBMEMATTYBME 

Lookup for an existing Contact

I am trying to create a list button that will lookup Contacts with a given input, display the results and select the desired Contact. Once the the Contact is selected the related list on an object will populate with that name.

Any ideas to get me started?
parkerAPTparkerAPT
You should be able to bind the any parent relationship directly to an input field using the inputField component.

For example if you are using the standard controller for an Contact you should be able to use the following code:

Code:
<apex:form>
<apex:inputField value="{!contact.AccountId}" />
</apex:form>

 This does not solve your entire problem, but should help you get started.