<apex:outputField value="{!application.CreatedById}" 

<apex:outputText value="{!application.CreatedById}" 

This both is giving me different value. Output Field is showing name and outputtext is showing id. I want to use output text to show name. Is it possible... as i have to add styling to it


Try this

<apex:outputText value="{!application.CreatedBy.name}" 

Uses the relationship to bring back the name

|improve this answer|||||
  • Its giving save error. Extra ',' .. Do in need to change some thing in controller code – TestNS Sep 26 '13 at 8:38
  • 1
    @TestNS just use . instead of ,: application.CreatedBy.name – Sergej Utko Sep 26 '13 at 8:42
  • It worked thanks.... Done one more change in controller code ... i was missing CreactedBy.Name in Query.. Added that as well – TestNS Sep 26 '13 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.