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
Mahesh Dhara 9Mahesh Dhara 9 

Is anything wrong in below vf ocode,data not displaying plz help me

<apex:page standardController="Account">
       <apex:pageBlock title="CONTACTS">
            <apex:pageBlockTable value="{!Account.Contacts}" var="con">
                 <apex:column>
                      <apex:facet name="header" >NAME</apex:facet>
                     {!con.Name}
                </apex:column> 
                <apex:column>
                      <apex:facet name="header">PHONE</apex:facet>
                    {!con.Phone}
                </apex:column>
          </apex:pageBlockTable>
        </apex:pageBlock>
</apex:page>
Best Answer chosen by Mahesh Dhara 9
Vishwajeet_TelangVishwajeet_Telang
Hi Mahesh,

Everthing is working fine. Try to hit the page by passing Account Id to the URL.

User-added image
Thank You

All Answers

Vishwajeet_TelangVishwajeet_Telang
Hi Mahesh,

Everthing is working fine. Try to hit the page by passing Account Id to the URL.

User-added image
Thank You
This was selected as the best answer
Amit Singh 1Amit Singh 1
Hello Mahesh,

No there is nothing wrong with the code everything seems to be fine. You just need to pass the account Id (record id) with the URL.
like below https://sfdcamit--c.ap2.visual.force.com/apex/TEst1?id=00128000016cBci

https://yoursalesforcedomain--c.ap2.visual.force.com/apex/yourVFpage?id=YourAccountID

Let me know the outcomes.

Thanks,
AMit
Mahesh Dhara 9Mahesh Dhara 9
Thankyou working fine i have added id but in that record there is no data any way thankyou