You need to sign in to do that
Don't have an account?
InboxO
Failed to save campingListItem.cmp: Invalid <aura:attribute> type: Camping_Item__c: Source
I get the following error when I try to save the code
"Failed to save campingListItem.cmp: Invalid <aura:attribute> type: Camping_Item__c: Source"
<aura:component>
<aura:attribute name="item" type="Camping_Item__c" required="true" />
<p>Name:
<ui:outputText value="{!v.item.Name}"/>
</p>
<p>Price:
<lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/>
</p>
<p>Quantity:
<lightning:formattedNumber value="{!v.item.Quantity__c}" style="number"/>
</p>
<p>
<lightning:input type="toggle"
label="Packed?"
name="Packed"
checked="{!v.item.Packed__c}" />
</p>
</aura:component>
"Failed to save campingListItem.cmp: Invalid <aura:attribute> type: Camping_Item__c: Source"
<aura:component>
<aura:attribute name="item" type="Camping_Item__c" required="true" />
<p>Name:
<ui:outputText value="{!v.item.Name}"/>
</p>
<p>Price:
<lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/>
</p>
<p>Quantity:
<lightning:formattedNumber value="{!v.item.Quantity__c}" style="number"/>
</p>
<p>
<lightning:input type="toggle"
label="Packed?"
name="Packed"
checked="{!v.item.Packed__c}" />
</p>
</aura:component>
You cmp is looking good but make sure you have this Camping_Item__c object or check your object name.
don't forget to mark it as best answer.
Thank you
All Answers
Type Of Attribute can Of List Text Number or Boolean You Cant Use Custom Field In Attribute Bt you Can Set Attribute Value From Controller Or Helper
Please Mark It As Best Answer If It Helps
Thank You!
You cmp is looking good but make sure you have this Camping_Item__c object or check your object name.
don't forget to mark it as best answer.
Thank you
did you apply my solution?
let me know if it help you by marking it as best answer.you best mark give us motivation to helping others.
Thank you