function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
IT Admin DeloitteIT Admin Deloitte 

Visualize lookup values in VF

Hi All,

I've got a looukp field, Program_Code__c, where users select a code. In reports, this fields is correctly populated with codes. When I try to visualize it in a VF page, it shows the corresponding IDs instead of codes.

There's a way to show the code instead of ids? I tried with a formula field but it's the same.

Any idea?

Thankyou!
Best Answer chosen by IT Admin Deloitte
Krishna SambarajuKrishna Sambaraju
If you use apex:outputText it will display the id, use apex:outputField which will display the name.