You need to sign in to do that
Don't have an account?
masthan khan
Challenge not yet complete... here's what's wrong: No Apex trigger named 'AccountAddressTrigger' was found
hai,
i had tried this in badge from trailhead, though i had created apex trigger it is showing error.
Error
Challenge not yet complete... here's what's wrong:
No Apex trigger named 'AccountAddressTrigger' was found
Apex Trrigger
trigger AccountAddressTrigger on Account (before insert) {
for ( Account a : Trigger.new ) {
if ( a.BillingPostalCode != NULL && a.Match_Billing_Address__c == true )
a.shippingPostalCode = a.billingpostalcode;
insert a;
}
}
Regards
Masthan Khan
i had tried this in badge from trailhead, though i had created apex trigger it is showing error.
Error
Challenge not yet complete... here's what's wrong:
No Apex trigger named 'AccountAddressTrigger' was found
Apex Trrigger
trigger AccountAddressTrigger on Account (before insert) {
for ( Account a : Trigger.new ) {
if ( a.BillingPostalCode != NULL && a.Match_Billing_Address__c == true )
a.shippingPostalCode = a.billingpostalcode;
insert a;
}
}
Regards
Masthan Khan
Try the above code and
Check is there any namespace in your org ..
Please Try this 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;
}
}
}
Please check you any trigger you have on Account object which is creating opportunity? If yes then please deactivate the trigger and try again.
Please try to deactivate all other triggers and validation rules on Account object and try again.
Please try to activate AccountAddressTrigger trigger on Account object and try again.
Please mark as best answer if it helps you.
Thank You
Ajay Dubedi