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
vpmvpm 

Not getting the account Name

In visualforce developer guide Page no :19

 

<apex:page standardController="Account">
Hello {!$User.FirstName}!
<p>You are viewing the {!account.name} account.</p>
</apex:page>

Best Answer chosen by Admin (Salesforce Developers) 
Satish_SFDCSatish_SFDC

You can check the same page number 19, which talks about bringing an account record into the current context.

 

From the doc:

To bring an account record into the current context, you must add a query parameter to the page URL that specifies the ID of the record. To do this:
Find the ID of an account by any means you wish. One easy way is to view the detail page of an account record and copy the character code at the end of the URL. For example, if you navigate to an account detail page with the following URL:
https://na3.salesforce.com/001D000000IRt53
Then 001D000000IRt53 is the ID for the account.
Back on your page, add the account ID as a query string parameter to the URL in your browser's address bar. For example, if your page is located at:
https://na3.salesforce.com/apex/HelloWorld2
Add ?id=001D000000IRt53 to the end of the URL:
https://Salesforce_instance/apex/HelloWorld2?id=001D000000IRt53

 

Regards,

Satish Kumar


Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.

All Answers

Satish_SFDCSatish_SFDC

Hi,

 

Is it the account name or the user first name which is not being displayed.

 

If it is the User's First name:

You can check in the User Detail page if there is a First Name saved for the user.

 

If it is the account name which is not being displayed, check the URL. It should have the Account ID as a parameter.

The url should be something like:

 

https://instance.salesforce.com/apex/<Your Page Name>?id='The ID of the Account'

 

Hope this helps.

 

Regards,

Satish Kumar


Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.

 

 

 

Satish_SFDCSatish_SFDC

You can check the same page number 19, which talks about bringing an account record into the current context.

 

From the doc:

To bring an account record into the current context, you must add a query parameter to the page URL that specifies the ID of the record. To do this:
Find the ID of an account by any means you wish. One easy way is to view the detail page of an account record and copy the character code at the end of the URL. For example, if you navigate to an account detail page with the following URL:
https://na3.salesforce.com/001D000000IRt53
Then 001D000000IRt53 is the ID for the account.
Back on your page, add the account ID as a query string parameter to the URL in your browser's address bar. For example, if your page is located at:
https://na3.salesforce.com/apex/HelloWorld2
Add ?id=001D000000IRt53 to the end of the URL:
https://Salesforce_instance/apex/HelloWorld2?id=001D000000IRt53

 

Regards,

Satish Kumar


Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.

This was selected as the best answer
souvik9086souvik9086

In the URL give like this

 

https://ap1.salesforce.com/apex/YourPageName?id='SOmeID'

 

Note:

ap1 - Your org instance

YourPageName - Name of your page

SOmeID - One Account id present in your organisation

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

 

vpmvpm
Thank you.