I tried adding them and this is my code:
trigger AccountAddressTrigger on Account (before insert, before update) {
for(Account a : Trigger.new){
if(a.Match_Billing_Address__c == true) {
a.Shipping_Postal_Code__c = a.Billing_Postal_Code__c;
}
}
}
My error is:
We updated an account that had 'Match_Billing_Address__c' set to true. We expected the trigger to fire, but it didn’t. Make sure the trigger fires if 'Match_Billing_Address__c' is true.
Has anyone else been able to make this challange work with the same problem? Edit: I did create a new playground, but it also doesn't have the postal code fields
Those field are part of standard 'BillingAddress' and 'ShippingAddress' fields of Account Object.
You might not be able to find it in Object Manager, but they are part of Address fields. Please use ShippingPostalCode and BillingPostalCode as fields and it will work.
You can verify their existince using SOQL query, Workbench or Salesforce Inspector or any similar tools. Address is a compound field consisting of Street,City,State.PostalCode etc.