Skip to main content

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; 

        } 

    } 

} 

Failed to enqueue tests.: An unknown exception occurred. 

 

#Trailhead Challenges

1 answer
  1. Oct 25, 10:13 PM

    Hi Shreya, your trigger logic is fine. "Failed to enqueue tests: An unknown exception occurred" is an org-side error when the checker tries to run tests, not a problem with your code. Things that usually clear it: 

    1) Go to Setup > Apex Classes and click "Compile all classes". One broken class anywhere in the org can stop tests from queueing. 

    2) Check Setup > Apex Test Execution. If any test runs are stuck in the queue, abort them, wait a few minutes, then check the challenge again. 

    3) Make sure the trigger is Active and the Match_Billing_Address__c checkbox field exists with exactly that API name. 

    4) Optional: the challenge only asks you to copy the postal code when the checkbox is true, so you can drop the null check to match the spec exactly. 

    If it still fails, deploy the same trigger to a fresh playground. That error is often a temporary playground issue. Hope this helps!

0/9000