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

How to display all users list as a lookup.



I need to display all users list as a lookup in visualforce page..



I have done this with picklist..

but i want it to be displyed as lookup..


can any one help me out??





u can create a lookup field on the respective object as user as the target object and bind this field in the visulaforce page to inputfield




<apex:inputfield value={!custom_object__c.userfieldname__c}"/>



Thanks for the reply..



I dont have any custom field...


is there any way to disply lookup in vf page...with all users list




nothing is impossible.. but you have to use javascript......


by using the below code u can simple get the list of users as lookup but u cant access them.. if you want to get the selected user u need to use some more JS coding...




    <apex:inputText />
    <a href="#" id="link" title="Contact Lookup (New Window)" tabindex="6"  onclick="javascript&colon;'');">
<img class="lookupIcon" title="Contact Lookup (New Window)" alt="Contact Lookup (New Window)" src="/s.gif"/>