Search code examples
javavisualforce

Account Information not displaying properly onto the SalesForce VisualForce page


I am newbie to the SalesForce and VisualForce pages, I write the below code but I dont see values are populating against it. Whats wrong? Any pointers?

<apex:page standardController="Account">
    <apex:pageBlock title="The PageBlock">
        <apex:pageBlockSection title="Test" columns="1">
            <apex:outputField value="{!Account.Name}"/>
            <apex:outputField value="{!Account.Balance_Fee__c}"/>
            <apex:pageBlockSectionItem>
                <apex:outputLabel value="Name & Code" />
                <apex:outputText value="{!Account.Name} ({!Account.Discount__c})" />
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>

enter image description here


Solution

  • Are you passing account ID to this page? pass it as ?id=<ACCOUNT_ID>