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
Navneeth RajNavneeth Raj 

How to bind Account Name in Accounts?

User-added image
How to bind Account Name in Accounts?
Best Answer chosen by Navneeth Raj
sfdcdevsfdcdev
The API Name of Account Name is Name.So use Account.Name instead of account.accountname:
 
<apex:inputField value="{!Account.Name}" />

 

All Answers

sfdcdevsfdcdev
The API Name of Account Name is Name.So use Account.Name instead of account.accountname:
 
<apex:inputField value="{!Account.Name}" />

 
This was selected as the best answer
Vivek DeshmaneVivek Deshmane
Hi Navneeth
Instead accountName use name then it will work and let me know

Best Regards
-Vivek
Amit Chaudhary 8Amit Chaudhary 8
Hi 

Please try below code. I hope that will help you.
<apex:page standardController="Account">
  <apex:form>
    <apex:pageBlock title="My Content" mode="edit">
      <apex:pageBlockButtons>
        <apex:commandButton action="{!save}" value="Save"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="My Content Section" columns="2">
        <apex:inputField value="{!account.name}"/>
        <apex:inputField value="{!account.site}"/>
        <apex:inputField value="{!account.type}"/>
        <apex:inputField value="{!account.accountNumber}"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

Remember, for this page to display account data, the ID of a valid account record must be specified as a query parameter in the URL for the page. For example

https://Salesforce_instance/apex/myPage?id=001x000xxx3Jsxb

Please check below link for more information
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_std_actions.htm

Please check below link for binding
https://developer.salesforce.com/page/Building_Visualforce_Pages_Using_the_Standard_Controller
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

Please let us know if this will help you.


Thanks
Amit Chaudhary
amit.salesforce21@gmail.com
Navneeth RajNavneeth Raj
Sorry for the late reply. Thank You, Everyone. All ur replies worked.