title: Apex Triggers - Trailhead
body: <p>The code itself doesn't give any errors, but anytime I run it Trailhead gives me this message:</p>
  
  <blockquote>
    <p>"Challenge not yet complete... here's what's wrong: 
     Executing the trigger did not work as expected. "</p>
  </blockquote>
  
  <p><strong>Here are the instructions:</strong></p>
  
  <p>For this challenge, you need to create a trigger that, before insert or update, checks for a checkbox. If the checkbox field is true, it sets the Shipping Postal Code (whose API name is <code>ShippingPostalCode</code>) to be the same as the Billing Postal Code (<code>BillingPostalCode</code>). </p>
  
  <ul>
  <li>The Apex trigger must be called <code>AccountAddressTrigger</code>.</li>
  <li>The Account object will need a new custom checkbox that should have the Field Label 'Match Billing Address' and Field Name of <code>Match_Billing_Address</code>. The resulting API Name should be <code>Match_Billing_Address__c</code>.</li>
  <li>With <code>AccountAddressTrigger</code> active, if an Account has a Billing Postal Code and <code>Match_Billing_Address__c</code> is true, the record should have the Shipping Postal Code set to match on insert or update.</li>
  </ul>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>trigger AccountAddressTrigger on Account (before insert,before update) {
  
      for(Account a : [SELECT Id FROM Account WHERE  Match_Billing_Address__c = TRUE AND BillingPostalCode != NULL])
      {
          a.ShippingPostalCode = a.BillingPostalCode;
          update a;        
      }//end for     
  }
  </code></pre>