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
Enrico devEnrico dev 

Visual force LookUp

I would like to create a lookup field in a visual force page. 

User-added image
User-added image

Problem is that i don ´t have a lookup field "Customer" on my custom object to add into VF page: i don t need to store the value of this lookup but i need it just for an update operation. For example i would like to link this lookup field to an apex controller property.

Do you know how to accomplish this?

Thanks in advantage for any advice.
Suneel#8Suneel#8
Lookup in VF page will appear only when it is a field on the object. As you don't want a field, you need to manullay implement that functioality.
One workaround I can think of is that you can create a report add a link to it on the page and ask user to search and copy required information from the report and paste it into text box you are planning to create on your VF page.
It looks to be good to have a field created,instead of this, as it can serve as reference  to the result of your controller logic. Not sure if there is any hack to achieve this :)