+ Start a Discussion
padmaja shivanepadmaja shivane 

how to create simple lookup in visualforce

Ankit Maini.Ankit Maini.
Hi Padmaja,
 
<apex:page  standardController="Contact">
  <apex:form><br/>
  Lookup Account :<br/><apex:inputField value="{!contact.accountid}"/> <br/><br/>
  Lookup Owner(User):<br/><apex:inputField value="{!contact.ownerid}"/> <br/><br/>
  Lookup Custom Object :<br/><apex:inputField value="{!contact.test_object__c}"/> <br />
  </apex:form>
</apex:page>

Here is the output :
User-added image

Hope it works for you,
 
Ankit Maini.Ankit Maini.
Note: Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.