+ Start a Discussion
SapanaSapana 

Regarding display of field on vf page from lookup window

I am trying to display a field from an object on a vf page which is  actually  a lookup field on that object and it is of text  data type ,

Instead of text value the  field is displaying  an Id value

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,

 

In the standard page of the salesforce the lookup field display the name instead of record id. For example in contact account lookup field display the account name instead of account id in contact detail page. But in the VF page the lookup field always display the id not the name.

 

If you want to display the record name instead of record id.

For Contact display the account name instead of account id use the account.name instead of accountid property.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

 

 

All Answers

Chamil MadusankaChamil Madusanka

post your code for lookup field

kiranmutturukiranmutturu

lookup itself is a type ..i think u are confused a bit....when u refer lookup u will get id in the backend

Navatar_DbSupNavatar_DbSup

Hi,

 

In the standard page of the salesforce the lookup field display the name instead of record id. For example in contact account lookup field display the account name instead of account id in contact detail page. But in the VF page the lookup field always display the id not the name.

 

If you want to display the record name instead of record id.

For Contact display the account name instead of account id use the account.name instead of accountid property.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved. 

 

 

 

 

This was selected as the best answer