• Himanshu Nimje
  • 14 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 5
Hi, I am having trouble with the "Attributes and Expressions" module from trailhead.

Here is the challenge:
Create a Lightning Component to display a single item for your packing list.
  • Create a component called campingListItem that displays the name (ui:outputText) and the three custom fields using the appropriate output components.
  • Add an attribute named 'item' for type Camping_Item__c.
I created an component named campingListItem and this is the code:
<aura:component >
    <aura:attribute name="item" type="<my_domain>__Camping_Item__c"/>
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.<my_domain>__Packed__c}"/>
    <ui:outputCurrency  value="{!v.item.<my_domain>__Price__c}"/>
    <ui:outputNumber value="{!v.item.<my_domain>__Quantity__c}"/>

The error that I am getting is: "Challenge Not yet complete... here's what's wrong: 
The packingListItem Lightning Component's attribute tag doesn't exist or its attributes are not set correctly."

With this, I tried to create another component, with the name "packingListItem", but It didn't work.

Can anyone help me?

i have created
1.AnimalLocator User-added image

User-added image


User-added image

error i am getting

User-added image

please help me

I alway get error "Challenge not yet complete... here's what's wrong: 
Executing the 'searchForContacts' method failed. Either the method does not exist, is not static, or does not return the expected contacts."

I have my code as following:
public class ContactSearch {
    public List<Contact> searchForContacts (String cName, String pCode) {
        List<Contact> matchCon = [SELECT Id, First_Name__c, Last_Name__c, MailingPostalCode__c FROM Contact
                                  WHERE Last_Name__c = 'cName'
                                  AND MailingPostalCode__c = 'pCode']; 
        if(matchCon.size() > 0){
            return matchCon;
        } else {
            return null;

Kindy check and tell me what is wrong

thank in advance




On my site I should get contact records but in my instance Contacts have 'Controlled by Parent' value and accounts have 'Private' value in Organization-Wide Defaults settings. What is the easiest way to give access to Contacts for Site Guest User in that case? I can't change Organization-Wide Defaults settings for account and contact.