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
Pradnya Pendharkar 4Pradnya Pendharkar 4 

Create a Visualforce page which displays a variety of output fields

It is a simple page here is the code 
<apex:page standardController="Opportunity">
            <apex:outputField value="{! Opportunity.Name}"/>
            <apex:outputField value="{! Opportunity.Amount}"/>
            <apex:outputField value="{! Opportunity.CloseDate}" />
            <apex:outputField value="{! Opportunity.AccountName}" />
</apex:page>
What's wrong


 
Gokula KrishnanGokula Krishnan
Hi Pradnya,

Change the AccountName output fieds as below:
 <apex:outputField value="{! Opportunity.Account.Name}" />

Regards,
Gokula Krishnan

If it helps you, please mark is as best answer, so it will be helpful for other developers.
sfdcMonkey.comsfdcMonkey.com
hi pradnya,
Use below code :
<apex:page standardController="Opportunity">
            <apex:outputField value="{! Opportunity.Name}"/>
            <apex:outputField value="{! Opportunity.Amount}"/>
            <apex:outputField value="{! Opportunity.CloseDate}" />
            <apex:outputField value="{! Opportunity.Account.Name}" />
</apex:page>
to check this vf page output :
https://monkey-blog-dev-ed.my.salesforce.com/apex/VfPageName?id=0066F00000kYsUi
give any existing opportunity id

i hope it helps you.
      Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
Thanks
http://sfdcmonkey.com
Iyyappan Mani 1Iyyappan Mani 1
Good answer
Celio XavierCelio Xavier
Olá pessoal, a minha solução ficou assim: 
<apex:page standardController="Opportunity">
    <apex:pageBlock title="Opportunity Details">
    <apex:pageBlockSection>
        <apex:outputField value="{! Opportunity.Name }"/>
        <apex:outputField value="{! Opportunity.Amount }"/>
        <apex:outputField value="{! Opportunity.CloseDate }"/>
        <apex:outputField value="{! Opportunity.Account.Name }"/>
    </apex:pageBlockSection>
</apex:pageBlock>
</apex:page>

Muito legal o Visual Force, para quem tem conhecimento de HTML é uma mão na roda!

Abraços Desenvolvedores. 

Célio Xavier