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
Caleb KuesterCaleb Kuester 

Lightning Component Trailhead Challenge

Greetings!

I have a problem.

The Trailhead Lightning Developer challenge requirements are listed as: 
  • Create a compenent called campingListItem.
  • Add an attribute named item for type Camping_Item__c that is required.
  • Display the Name, Price, Quanity and Packed status using the appropriate output fields
My component within my developer org is called campingListItem. 

The code is here:
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" default="{ 'Name': 'asdf',
               'Price__c': '0',
               'Quantity__c': '3',
               'Packed__c': true
             }"/>
    <p>Name: <ui:outputText value="{!v.item.Name}" /> </p>
    <p>Price: <ui:outputCurrency value="{!v.item.Price__c}" /> </p>
    <p>Quantity: <ui:outputNumber value="{!v.item.Quantity__c}" /> </p>
    <p>Packed status: <ui:outputCheckbox value="{!v.item.Packed__c}" /> </p>
</aura:component>

I have tried both uninstantiated and instantiated values for "item." I have tried with and without text descriptions of the items. This challenge will not validate as successful and I find the description itself mildly vague. 

What could I be doing wrong?

Thanks in advance, 
SomeForumGuy
Best Answer chosen by Caleb Kuester
sfdcMonkey.comsfdcMonkey.com
hi Caleb Kuester

update your <aura:attribute> with these value 

<aura:attribute name="item" type="Camping_Item__c" required="true"/>

Thanks 
Mark it solve if it helps you :)

 

All Answers

sfdcMonkey.comsfdcMonkey.com
hi Caleb Kuester

update your <aura:attribute> with these value 

<aura:attribute name="item" type="Camping_Item__c" required="true"/>

Thanks 
Mark it solve if it helps you :)

 
This was selected as the best answer
Caleb KuesterCaleb Kuester
This was the solution. I see no option here to "mark as solved," so it has been marked as "the best answer."