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
pooja h 1pooja h 1 

Unable to view content in the visual force page


Hi,
1) I'm learning salesforce through trialhead. Currently working in Visual force module. When I run the below Program in visualforce page I recieve a blank page as an outputand unable to view the account content in the page.
INPUT:
<apex:page standardController="Account" >
<apex:outputField value="{! Account.Name }"/>
<apex:outputField value="{! Account.Phone }"/>
<apex:outputField value="{! Account.Industry }"/> <apex:outputField value="{! Account.AnnualRevenue }"/>
</apex:page>
OUTPUT:
User-added image

2)How to change javascript console in chrome and why it is needed?
Please someone help me for better understanding

Thanks in advance!
Best Answer chosen by pooja h 1
Waqar Hussain SFWaqar Hussain SF
Hi Pooja,

Since you are using standard controller of account. You will have to put Id of account in the URL parameter. 
such as

.../apex/AccountDetail?Id=XXXX
where XXXX is account Id

I did not get your second question. If you want to debug the apex code. You can activate debug logs by 
Setup > Debug Log

Thanks
 

All Answers

Waqar Hussain SFWaqar Hussain SF
Hi Pooja,

Since you are using standard controller of account. You will have to put Id of account in the URL parameter. 
such as

.../apex/AccountDetail?Id=XXXX
where XXXX is account Id

I did not get your second question. If you want to debug the apex code. You can activate debug logs by 
Setup > Debug Log

Thanks
 
This was selected as the best answer
pooja h 1pooja h 1
My second question is when I try to change the javscript in my chrrome developer console it end up with a error. Please check below for better understanding.
User-added image
pooja h 1pooja h 1
For the First question I tried as your suggestion but still my page is empty(Account ID-0011N00001Eqqv5QAB has contentin it).Can you please help
User-added image
Waqar Hussain SFWaqar Hussain SF
1) Use below URL for your VF page. This will show what you need.
https://c.na78.visual.force.com/apex/AccountDetail?Id=0011N00001Eqqv5QAB

2) No idea about this error.
Sandeep YadavSandeep Yadav
Hello Pooja 
You are passing the Id of an account record in a wrong way in the URL.
use  /apex/AccountDetail?id=xxx  just after visualforce.com in your page URL like this--
https://c.na78.visualforce.com/apex/AccountDetail?id=xxx
where xxx is your account record Id.

Hope this helps you.
Mark this as solved.
Thanks.