You need to sign in to do that
Don't have an account?

Displaying lookup field in VF page
Hi Guys,
I need to display lookup fields in a Table of VF page. I am getitng Id Instead of Name..Can Anyone Help me on this.
Appriciate your help..
Thank You.
Raghu
Raghu,
From Visualforce you can call an Apex method that will perform a SOQL query to get the name from the Id. The SOQL query could look something like
[select object.name from object where object.id = :id]
If what you want to do is just display a Lookup Field related to a Field from any Object:
<apex:inputField value="{!ObjectReferencedInStandardController.LookupFieldInObject}" />
So if you had a Custom Object named Deals__c and a custom Lookup field Account__c:
<apex:page standardController="Deals__c" >
<apex:inputField value="{!Deals__c.Account__c}" />
If you want to reference multiple lookup Fields from Multiple Objects, you should define a Controller extension and instantiate an Object for each Field needed.
So:
VF Page:
And Controller
Hope this helps.