• Shubham gupta
  • NEWBIE
  • 0 Points
  • Member since 2022
  • Salesforce Developer
  • InfoFeat


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
I've spent hours trying to figure this challenge out and finally got it working, but now when I go to 'Check' the challenge, it's not giving me the credit I deserve! The task seems pretty straightforward, but i'm sure i'm missing some code they think is necessary. Like the teacher telling you that you "solved the problem wrong" even though you got the right answer...

Error is: Challenge Not yet complete... here's what's wrong: 
The campingListItem JavaScript controller isn't setting the 'item' attribute correctly.

------ campingListItem.cmp ------
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" default="{'sobjectType':'Camping_Item__c','Packed__c':false}"/>
    <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:
        <ui:outputCheckbox aura:id="checkbox" value="{!v.item.Packed__c}"/>
    </p>
    <ui:button label="Packed!" press="{!c.packItem}"/>  
</aura:component>


------ campingListItemController ------
({
    packItem : function(component, event, helper) {
        component.set("v.item.Packed__c",true);
        event.getSource().set("v.disabled",true);
    }
})
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}"/>
</aura:component>

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?

Thanks,
Can u help me in ISCHANGE functionality. When ISCHANGE function is used at what situatio this function is used.please help me out

 

Hi,

 

Is there any way we could check if the record is opened for first time after it got created?

 

Thanks in advance!

 

Sales4ce

Hi,
 
In formulas you can use ISCHANGED function. Is there a similar method in Apex or is there some recommended design pattern for checking if a field value has changed in after update event?
 
How about ISNEW function?
 
Thanks!
  • November 28, 2008
  • Like
  • 0