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
Ali Hassan 4Ali Hassan 4 

TRailhead Using Standard Controllers Error

Hi all, 
THis my code 
<apex:page standardController="Contact" >
<apex:pageBlock title="Contact View">

    <apex:pageBlockSection>
    First Name : {! Contact.FirstName } <br/>
    Last Name :  {! Contact.LastName } <br/>
    Email: {! Contact.Email } <br/>

    </apex:pageBlockSection>
       
    </apex:pageBlock>

</apex:page>

But keep getting this Error 
The page does not include a bound owner's email variable for the Contact record

I am not really sure what i am doing wrong 
 
Best Answer chosen by Ali Hassan 4
KaranrajKaranraj
Ali - You have to display the Contact owner Email Id not the contact email address in your visualforce page

All Answers

KaranrajKaranraj
Ali - You have to display the Contact owner Email Id not the contact email address in your visualforce page
This was selected as the best answer
Ali Hassan 4Ali Hassan 4
I figured it out, Thank you 
Praveen ShankarPraveen Shankar
<apex:page sidebar="false" standardController="contact">
    <apex:pageBlock title="contact summary">
        <apex:pageblocksection>
            first name :{!contact.firstname} <br/>
            last name  :{!contact.lastname}  <br/>
            email      :{!contact.owner.email}<br/>
        </apex:pageblocksection>
        </apex:pageBlock>
   
</apex:page>




Please refer the codes written above . I am able to complete the challenge
Salesforce AnswersSalesforce Answers
This video shows the solution to "Using Standard Controller" =====> https://www.youtube.com/watch?v=L4xCQl3Xyp4
Sanjay KhairnarSanjay Khairnar
I was able to complete the challenge after checking Praveen Shankar's answer. However, I am not very clear. Contac Owner is a lookup on 'User' object. The 'User' object does not have a field named 'Email' (checking under Setup -> Object manager). I was earlier using 'senderEmail' field from User object. Where is the Email field on User object? Can someone please share some explanation ? Thanks.
Devon CharlstonDevon Charlston
I agree wit you Sanjay when connecting the dots it seems a little vague how Praveen's answer makes any sense. 

 The big one for me is why is contact.owner.email able to work? Shouldn't it be Contact.OwnerId.SenderEmail​ ? 

My thinking is its finding the ownerid and linking it to the user database and then finding the email field inside there?