You need to sign in to do that
Don't have an account?
kazumi
Page access error in Quick Start Tutorial
I tryed Visualforce Quick Start Tutorial, but it was not work on section "Displaying Field Values on a Page".
<apex: page standardController="Account"> Hello {!$User.FirstName}! <p>You are viewing the {!account.name} account.</p> </apex: page>I could not get result page from below URL access.
https://na5.salesforce.com/apex/HelloWorld?id=00570000001EOx5
I got "00570000001EOx5" from URL of my personal information page as described Tutorial, but error occured. How can I solve this problem ? Thanks, Kazumi
For the URL you need to grab an ID for an account record, and not the user record that displays when you click on your personal information in setup.
To find the ID for an account, navigate to the Accounts tab, click on an account to show its detail page, and then grab the ID off the URL. You'll know you have a good one if it starts with 001, which is the prefix for all account IDs (005 is the prefix for all user IDs).
The reason you need an account ID, and not a user ID, is because {!$User.FirstName} in the markup is actually accessing a global variable called $User -- this global always matches the record for the user who is currently logged in (you!). Global variables always start with a $ character, and they don't need an ID specified in the URL.
Later in the code is the variable that _does_ need an ID in the URL: {!account.name}. Since there are probably a lot of account records in your organization, you have to specify the exact one that should provide the values for the page with an ID.
Hope that answers your question and gets your page working the way you expect!
Caroline Roth
Manager, Platform Documentation
salesforce.com
Thank you for your very quick answer !
I unserstand difference between user id and account id, and I have made sure account information page are working well.
I had confused user and account because "Account" is translated to Japanes word (TORIHIKISAKI) in my environment.
Thank you so much,
Kazumi
Thank you for your point.
I eliminate white space between apex tag and name.
Thanks,
Kazumi.
Hi,
I am trying the same example and has correct account id ( starting from 001) in URL and has no space in the apex:page tag. But my output displays as
Hello World!
You are viewing the account.