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
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:
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:
 opportunity.account.name

Thanks Sakthivel
NAVEEN KUMARNAVEEN KUMAR
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

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