• vinod reddy 21
  • NEWBIE
  • 5 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
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,
Hi,

I have scenario that update a custom field(Amount__C) of parent(Account) with sum of all child records (Total_Price) from Child Object(Invoice Line Item).

I have to wirte a trigger for above scenario, if any one have sample code please share it.

Thanks in advance,
Shaik
  • December 21, 2014
  • Like
  • 1

Hello:

 

I do a monthly Upsert via bulk upload (Apex Data Loader) of records on custom object Subscriber__c.

 

What I want to do is once the upsert is complete, delete any records that were not created or updated during he bulk Upsert process.

 

Here is the trigger I have written - and I am aware this may be terrible or not even close to what I need :)

 

trigger DeleteSubs on Subscriber__c(after insert, after update) {
 List<Id> lstId = new List<Id>();
 
for(Subscriber__c sub: Trigger.old){
        List<Subscriber__c> nolongersubs = [Select Id from Subscriber__c where LastModifiedDate<TODAY];
        delete nolongersubs;
    }
 
}

 When trying to insert a single record I am getting execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object:Trigger.DeleteSubs: line 4, column 1

 

Any help would be greatly appeciated.

 

Thanks,

 

Hampton