+ 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: