• ac2sharath1.391056526163461E12
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
In my org i have enabled Person Account, and i have a visualforce page where i need to get Salutation,FirstName and LastName field from person account, But when i call it using <apex:inputField value="{!account.lastname}"/> I'm getting only field label here i'm using "account" as a standard controller.

But I have used same line of code i.e <apex:inputField value="{!account.lastname}"/> to get contact's Lastname using "Contact" as standard controller

Here in the below code I'm getting only field label for "Salutation" and "Lastname" but I'm getting both label and field for "Account Name"

can anyone tell me what's problem here ?


<apex:page standardController="Account" extensions="pick_list" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >

   <apex:pageBlockSectionItem >
         <apex:outputlabel value="First Name"/>
         <apex:outputpanel >
         <apex:inputfield value="{!account.Salutation}" />
         &nbsp;
         <apex:inputfield value="{!account.FirstName}" />
         </apex:outputpanel>
  </apex:pageBlockSectionItem>
  <apex:inputfield value="{!account.lastname}"
  <apex:inputfield value="{!account.name}"
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>  
</apex:page>