• Tarun Gupta 33
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 4
This component works but does not validate and gives the following error message:
Step not yet complete... here's what's wrong: 
The CSS does not contain a reference to the background image 
Note: you may run into errors if you've skipped previous steps.
Hi All,

Below are the requirements to complete Challenge

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.

I have created new custom Checkbox(MatchBillingAddress) and Below is my trigger:

trigger AccountAddressTrigger on Account (before update,before insert)
   List<Account> list1=[SELECT Id,Match_Billing_Address__c,ShippingPostalCode,BillingPostalCode from Account];
  for(Integer i=0;i<list1.size();i++)
    if(list1[i].Match_Billing_Address__c=true && list1[i].BillingPostalCode!=NULL)
    update list1[i];

I got Error like : Executing the trigger did not work as expected.

Can anyone please help me to achieve this. Thanks