function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Hemant Kumar 145Hemant Kumar 145 

stuck on module 2

Hi All,

Am getting  these errors while hitting check challenge.

CODE:
trigger AccountAddressTrigger on Account (before insert, before update) {
    for(Account a: trigger.new){
        if(a.Match_Billing_Address__c == true && a.BillingPostalCode != null){
            a.ShippingPostalCode = a.BillingPostalCode;
        }
    }
}

errors
We updated an account that had 'Match_Billing_Address__c' set to false. We expected the trigger not to fire, but it did. Make sure the trigger fires only if 'Match_Billing_Address__c' is true.

I have already deactive all the triggers and deleted the validation rule on Account object, but still am getting erros.

Please help me out,
Thanks
AbhinavAbhinav (Salesforce Developers) 
Hi Hemant,

Please note that Questions about how to pass Trailhead challenges are not on topic, because these challenges are intended to be independent demonstrations of your abilities.Trailhead Help (https://trailhead.salesforce.com/en/help?support=home)can provide assistance for situations where Trailhead does not appear to be functioning correctly. You can reach out to them if this is the case.

Thanks!