• karim gabriel
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi,

I believe I completed the module correctly based on the other posts. How ever I get the error below. My only thought is that for some reason I am not using the right Object (even though it is labeled correctly).  I posted the relevant screenshots (I think).Any suggestions?

Thanks in advance.

Regards,

KarimUser-added imageUser-added imageUser-added image
 
Create an Apex trigger for Account that matches Shipping Address Postal Code with Billing Address Postal Code based on a custom field

I used the code below and am getting this error... "Challenge Not yet complete... here's what's wrong: 
Setting 'Match_Billing_Address__c' to true did not update the records as expected." I have no other triggers or validation rules activated. any help would be much appreciated. Thanks in advance

trigger AccountAddressTrigger on Account (before insert,before update) {


List<Account> acclst=new List<Account>();
  for(account a:trigger.new){
    if(a.Match_Billing_Address__c==true && a.BillingPostalCode!=null){
    a.ShippingPostalCode=a.BillingPostalCode;
        
    }

}
}
Hi,

I believe I completed the module correctly based on the other posts. How ever I get the error below. My only thought is that for some reason I am not using the right Object (even though it is labeled correctly).  I posted the relevant screenshots (I think).Any suggestions?

Thanks in advance.

Regards,

KarimUser-added imageUser-added imageUser-added image