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
Vinay BandaVinay Banda 

Record Details not showing

Hi All,
 I've created simple page to show contact basic info. When I used preview and it is opening in context of Contact but I used record id to see values of specific recors. code not fetching any recors.

URL: https://c.ap2.visual.force.com/apex/ContactView?core.apexpages.request.devconsole=0032800000WyJgW

<apex:page title="Contact" standardController="Contact">
    <apex:pageBlock title="Contact Summary">
        <apex:pageBlockSection>
            Name: {! Contact.FirstName } <br/>
            Phone: {! Contact.LastName } <br/>
            Email: {! Contact.owner.email } <br/>
        </apex:pageBlockSection>
    </apex:pageBlock>
</apex:page>


Please let me know what could be the issue.
 
SandhyaSandhya (Salesforce Developers) 
Hi,

To view the details of particular record use this.

https://c.ap2.visual.force.com/apex/ContactView?id=0032800000WyJgW

Thanks and Regards
Sandhya
NagendraNagendra (Salesforce Developers) 
Hi Vinay,

As per your code it will display  information showing the field details of first name,last name,owner email.But when the page is loaded its opening in the context of contact because nothing is specified there which record information has to be displayed.

Try the below:

If you want to display a particular contact information from the below code first save your vf page and then pass the contact record id in the url as below(Ex:https://elcdomain-dev-ed--c.ap2.visual.force.com/apex/contactview001?id=0032800000OJzzK )

User-added image
Before specifying the record id:
User-added imageAfter Specifying the record id:
User-added image
Please make sure to mark this post as solved if it helps you.

Best Regards,
Nagendra.P