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
mgiakkmgiakk 

Use the LookupSearch Layout next to apex:inputText

Hello,

 

I want to use the lookup search icon (magnifying glass) next to an input field. How can I do this???

I am using <apex:inputText value="{!product}"/> and I want to be able to search for products. In another thread I've seen something like:

<apex:inputText value="{!product.SelfLookUpfieldAPIName}"/>, but cannot get it to work.

 

Please help,

Mike.



Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You will have to use an apex:inputField in order to get the lookup functionality - its not available to other input types.

 

The other option is to roll your own in Visualforce.  I wrote a blog post about this some time ago at:

 

http://bobbuzzard.blogspot.com/2010/09/visualforce-lookup.html

All Answers

bob_buzzardbob_buzzard

You will have to use an apex:inputField in order to get the lookup functionality - its not available to other input types.

 

The other option is to roll your own in Visualforce.  I wrote a blog post about this some time ago at:

 

http://bobbuzzard.blogspot.com/2010/09/visualforce-lookup.html

This was selected as the best answer
mgiakkmgiakk

Thank you. I used inputField instead.. :smileyhappy: