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
Francisco RiccomagnoFrancisco Riccomagno 

Using Simple Variables and Formulas challenge is not working

Hello, I'm trying to do the Using Simple Variables and Formulas challenge from Intro to Programmatic App Development. Is asking for:
Create a Visualforce page that displays the first name of the logged-in user.
I created a VF page named as is requested, with the following code:
<apex:page>
    {! $User.FirstName } 
</apex:page>
But when trying to check the challenge, I get the error:
Challenge not yet complete... here's what's wrong: 
The Visualforce page did not fit the criteria. The first name of the logged in user was not output using dynamic global variables.

What am I doing wrong?
Thank you!
Best Answer chosen by Francisco Riccomagno
Frédéric TrébuchetFrédéric Trébuchet
Try 
<apex:page>
    {!$User.FirstName } 
</apex:page>
instead of
<apex:page>
    {! $User.FirstName } 
</apex:page>
white space before $User removed

Fred

All Answers

Frédéric TrébuchetFrédéric Trébuchet
Hi Francisco,

I'd the same problem and solved it by removing extra caracters (ie. éèù and so on) from the user firstname (the one which is in the org you use for the trailhead's challenges).

Hope this helps,
Fred
Francisco RiccomagnoFrancisco Riccomagno
Frederic, thank you for your response, but I believe this is not my case, as my FirstName has not accents or extra characters
Frédéric TrébuchetFrédéric Trébuchet
Try 
<apex:page>
    {!$User.FirstName } 
</apex:page>
instead of
<apex:page>
    {! $User.FirstName } 
</apex:page>
white space before $User removed

Fred
This was selected as the best answer
Francisco RiccomagnoFrancisco Riccomagno
That worked!
Thank you.
Frédéric TrébuchetFrédéric Trébuchet
Great! Thanks for the tag.
Katie M FritzKatie M Fritz
I was having the same problem. For me, it only worked when I removed ALL spaces from {!$User.FirstName}, not just the first space as in your example.

Thanks for the tip! I was going crazy. :)
Salesforce AnswersSalesforce Answers
A video showing the solution to this challenge is located here. ======> https://www.youtube.com/watch?v=wFCH1L9ygSA

                        --- Salesforce Answers