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
raju.Braju.B 

How to display all users list as a lookup.

Hi,

 

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??

 

Thanks,

Raj.b

kiranmutturukiranmutturu

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}"/>

raju.Braju.B

Hi,

Thanks for the reply..

 

 

I dont have any custom field...

 

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

 

 

kiranmutturukiranmutturu

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

kiranmutturukiranmutturu

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:page>
<apex:form>
    <apex:inputText />
    <a href="#" id="link" title="Contact Lookup (New Window)" tabindex="6"  onclick="javascript&colon;window.open('https://ap1.salesforce.com/_ui/common/data/LookupPage?lkfm=editPage&lknm=newOwn&lktp=StandardUserLookup');">
<img class="lookupIcon" title="Contact Lookup (New Window)" alt="Contact Lookup (New Window)" src="/s.gif"/>
</a>
</apex:form>
  
</apex:page>