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
anurajanuraj 

standardController

Hi 

I am trying to display the account name , Mailing_Street__c from account object in VF page but i am not able to display it. The code is here 

<apex:page standardController="account">
<apex:form >
<apex:pageBlock >

{!account.name}
<apex:pageBlockSection title="Account Details" columns="1"> 
<apex:outputField value="{!account.name}" label="Account" />
<apex:outputField value="{!account.Mailing_Street__c}"/>
</apex:pageBlockSection>

<!--<table border ="1">
  <tr>
    <td>{!account.name}</td>
  </tr>
</table>-->
</apex:pageBlock>
</apex:form>
</apex:page>

  When i used this code i am only able to display the field name only. please help me to solve this problem.

thanks

Anuraj

Chamil MadusankaChamil Madusanka

Have you set parameter to the URL.

 

/apex/YourPageName?id=SomeAccountIDHere
/apex/TestPage4?id=00190000009Bbvk

 Check wth your one of account ID as the parameter

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 

anurajanuraj

sorry i am not able to understand please can you explain ne how to use it.

Chamil MadusankaChamil Madusanka

You have said that you could not able to display the output fields in visualforce. Please post your URL, when you test your vf page with this code. And eloborate your  issue.

anurajanuraj

ok fine i got it by passing parameter. but can you hel me to display some amount of value.

raseshtcsraseshtcs

could you paste a screenshot of how u see the page right now. It would be easier to comment on the issue

Teach_me_howTeach_me_how

it should display value.. how do you call your visualforce page?

Andy BoettcherAndy Boettcher

Which fields are you looking to display?  All of the Account object fields are able to be shown on a VF page in the manner that you have set.  Look at your object fields (Setup -> Customize -> Accounts) and use the "API Name" in your VF variable.

 

-Andy