- August 23, 2019 at 5:14 am #61504Hariom Chaudhary #30
How we can create lookup fields in Visualforce pages in salesforce ??
How we can create lookup fields in VF pages ??August 23, 2019 at 5:17 am #61508Prachi #2
Lets take an Example:
Suppose you have an Employee Custom Object. In that lets say you have First Name Custom field.
Now you want the lookup icon to be displayed for the above field in your Visualforce page.
In your Controller do the following,
public Employee__c getFirstName()
return [select FirstName__c from Employee__c limit 1];
Now, In your Visualforce page do the following.
where firstName is the method name in the Controller.
By doing this a lookup icon will be rendered on ur Visualforce page.
- This reply was modified 5 months ago by Prachi.
Please Register to reply to this topic. /