• Amit Behere
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Hello, 
i am getting following error 
User-added image
Sorry to interrupt
This page has an error. You might just need to refresh it. Action failed: aura:iteration$controller$itemsChange [Cannot read property 'config' of undefined] Failing descriptor: {aura:iteration$controller$itemsChange}

config is not used in my JS then also  i am getting the  error

JS Code
 
removeDeletedRow: function(component, event, helper) {
        // get the selected row Index for delete, from Lightning Event Attribute  
     var index =event.getParam("indexVar"); //here i am getting exact index 
        //  var index= event.getSource().get("v.tabindex");
       // var index=event.currentTarget.Dataset.index;
    console.log("index>>>>>>>>>>>>"+index);
        // get the all List (contactList attribute) and remove the Object Element Using splice method    
        var AllRowsList = component.get("v.bookingList");
       
        AllRowsList.splice(index, 1);
        
        // set the contactList after remove selected row element  
        component.set("v.bookingList", AllRowsList);
      
    },

in above js function i am getting error which i mention above

Component code
<aura:iteration items="{!v.bookingList}" var="obj" indexVar="index">
      <span>
                <tr class="slds-text-title_caps">
                    <td> 
                          <h1>{!index}</h1>
                    </td>
                    <td>
                        <lightning:input class="slds-input"  text="{!index}" name="{!'DES_'+index}" value="{!obj.Description__c}"/>
                    
                    </td>
                    <td>
                        <lightning:input class="slds-input"   text="{!index}" name="{!'AMT_'+index}" value="{!obj.Amount__c}" required="true"/>
         
                    </td>
                    <td>
                        <lightning:input type="checkbox"   text="{!index}" name="{!'CHECK_'+index}" checked="{!obj.IsBooking__c}" onchange="{!c.updateAmount}"/> 
                        
                    </td>
                    <td>
                        <lightning:input class="slds-input"   text="{!index}" name="{!'GROSS_'+index}" value="{!obj.GrossAmount__c}" readonly=""  />
                    </td>
                    <td>
                        <lightning:button  tabindex="{!index}" value="{!index}" onclick="{!c.removeDeletedRow}" label="Delete"/>
<a  data-index="{!index}" onclick="{!c.removeRow}">Delete</a>
            
                    </td> 
                </tr>
                </span> 
            </aura:iteration>

In any solution help me out.... 



 
Hello, 
i am getting following error 
User-added image
Sorry to interrupt
This page has an error. You might just need to refresh it. Action failed: aura:iteration$controller$itemsChange [Cannot read property 'config' of undefined] Failing descriptor: {aura:iteration$controller$itemsChange}

config is not used in my JS then also  i am getting the  error

JS Code
 
removeDeletedRow: function(component, event, helper) {
        // get the selected row Index for delete, from Lightning Event Attribute  
     var index =event.getParam("indexVar"); //here i am getting exact index 
        //  var index= event.getSource().get("v.tabindex");
       // var index=event.currentTarget.Dataset.index;
    console.log("index>>>>>>>>>>>>"+index);
        // get the all List (contactList attribute) and remove the Object Element Using splice method    
        var AllRowsList = component.get("v.bookingList");
       
        AllRowsList.splice(index, 1);
        
        // set the contactList after remove selected row element  
        component.set("v.bookingList", AllRowsList);
      
    },

in above js function i am getting error which i mention above

Component code
<aura:iteration items="{!v.bookingList}" var="obj" indexVar="index">
      <span>
                <tr class="slds-text-title_caps">
                    <td> 
                          <h1>{!index}</h1>
                    </td>
                    <td>
                        <lightning:input class="slds-input"  text="{!index}" name="{!'DES_'+index}" value="{!obj.Description__c}"/>
                    
                    </td>
                    <td>
                        <lightning:input class="slds-input"   text="{!index}" name="{!'AMT_'+index}" value="{!obj.Amount__c}" required="true"/>
         
                    </td>
                    <td>
                        <lightning:input type="checkbox"   text="{!index}" name="{!'CHECK_'+index}" checked="{!obj.IsBooking__c}" onchange="{!c.updateAmount}"/> 
                        
                    </td>
                    <td>
                        <lightning:input class="slds-input"   text="{!index}" name="{!'GROSS_'+index}" value="{!obj.GrossAmount__c}" readonly=""  />
                    </td>
                    <td>
                        <lightning:button  tabindex="{!index}" value="{!index}" onclick="{!c.removeDeletedRow}" label="Delete"/>
<a  data-index="{!index}" onclick="{!c.removeRow}">Delete</a>
            
                    </td> 
                </tr>
                </span> 
            </aura:iteration>

In any solution help me out.... 



 
Hi All,

Can anyone please help me with bellow challenge.


Create an Apex trigger for Account that matches Shipping Address Postal Code with Billing Address Postal Code based on a custom field.
For this challenge, you need to create a trigger that, before insert or update, checks for a checkbox, and if the checkbox field is true, sets the Shipping Postal Code (whose API name is ShippingPostalCode) to be the same as the Billing Postal Code (BillingPostalCode).The Apex trigger must be called 'AccountAddressTrigger'.
The Account object will need a new custom checkbox that should have the Field Label 'Match Billing Address' and Field Name of 'Match_Billing_Address'. The resulting API Name should be 'Match_Billing_Address__c'.
With 'AccountAddressTrigger' active, if an Account has a Billing Postal Code and 'Match_Billing_Address__c' is true, the record should have the Shipping Postal Code set to match on insert or update.

For above challenge i tried with following code but looks like it doesnt mach the requirement.

trigger AccountAddressTrigger on Account (before insert, before update) {
    for(Account a : Trigger.new){
        If (a.Match_Billing_Address__c = true) {
            /*ShippingPostalCode = BillingPostalCode;*/
        }   
    } 

}

Please help me