hi I created a custom object county. at the time of creation i created record name field as a text and name it as countryname when i display it on visualforce page using this following expression {!country__c.countryname} i am getting error how to display it

  • This seems like a too basic question. Mar 10, 2015 at 6:26
  • Shouldn't that be {!country__c.countryname__c} ? Mar 10, 2015 at 6:27
  • 1
    <apex:outputField value="{!country__c.countryname__c}"/> Thanks, Pritam Shekhawat Mar 10, 2015 at 6:39
  • hi bart juriewicz your saying that it's a basic question? do you know standard fields in custom objects won't have api names
    – balaji
    Mar 11, 2015 at 14:29

1 Answer 1


You are using Field Label. Instead use Field API Name like this:

<apex:inpuputField value="{!country__c.Name}"/> 


  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. Mar 10, 2015 at 12:27
  • You are using Field Label instead use Field API Name <apex:outputField value="{!country.Name}"/> Thanks, Mar 10, 2015 at 12:27
  • hi thanks for your idea i had tried even i am getting error.standard fields in custom objects won't have api names
    – balaji
    Mar 11, 2015 at 14:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .