+ Start a Discussion
Hiteshkumar Chaudhari 2Hiteshkumar Chaudhari 2 

how to use lookup field in visualforce page and how to write apex code for controlling

I want to use lookup field in my visualforce page . Can anybuddy help me to achieve that with the controller code
Navin SoniNavin Soni
// Controller
public class MyCustomLookupController {
public Contact contact {get;set;}
    public MyCustomLookupController() {
        contact = new Contact();

//Visualforce Page 
<apex:inputField id="Account" value="{!contact.AccountId}"/>