+ Start a Discussion
Ritika ShoucheRitika Shouche 

Unbale to show query field on Visualforce Page

Hi I am trying to Show COntacts Account Name on VIsualforce Page while Using Custom COntroller - 
 
Contact con = [Select id,Name,AccountId,Account.Name FROM  Contact WHERE ID =: usr.ContactId];

I am trying to Get Account.name on the head of a Page.

I am trying to use Apex:Repeat but nothing is getting displayed.
 
<apex:repeat value="{!con}" var="myCon" > <apex:outputField value="{!myCon.Account.Name}" /> </apex:repeat>

 
Best Answer chosen by Ritika Shouche
Balayesu ChilakalapudiBalayesu Chilakalapudi
Check Field accessibility settings for Name field of account, make it as visible if not already done

All Answers

Lokesh KumarLokesh Kumar
can you please share the code of both VF and Controller !!
Balayesu ChilakalapudiBalayesu Chilakalapudi
Check Field accessibility settings for Name field of account, make it as visible if not already done
This was selected as the best answer