+ Start a Discussion
Jim RiggioJim Riggio 

Displaying Records, Fields, and Tables - Challenge issue

This is my code for the Trailhead  Displaying Records, Fields, and Tables challenge:

Code for challedge

This is my output:

They challenge fails but I am displaying all content.. Please let me know what is wrong.

Best Answer chosen by Jim Riggio
Sakthivel ThandavarayanSakthivel Thandavarayan
try opportunity.account.name

All Answers

Sakthivel ThandavarayanSakthivel Thandavarayan

what is the error message ? 

try displaying the "Name" field of account instead of accountid 

Jim RiggioJim Riggio
This is the message I received:
Challenge not yet complete... here's what's wrong:
The page does not include a apex:outputField component bound to the opportunity account name

Using this statement below gives me the error above.
<apex:outputField value="{! Opportunity.Name }"/> 

This statement displays the Account Name of the Opportunity
<apex:outputField value="{! Opportunity.AcccountID }"/> 

So not sure what Trailhead is looking for
Sakthivel ThandavarayanSakthivel Thandavarayan
try opportunity.account.name
This was selected as the best answer
Jim RiggioJim Riggio
This worked:

Thanks Sakthivel
1. if you use Accountid  the output will be displayes as a link so user  can navigate to account .

2. if you use opportunity.account.name it will give only account name without hyperlink

Trailhead looking for second solution

Salesforce AnswersSalesforce Answers
The solution to the "Displaying Records, Fields, and Tables" challenge can be viewed here. ====> https://www.youtube.com/watch?v=RBEPFY4VHxI