title: Salesforce: Create a Trigger to insert record in custom object
body: <p>I'm trying to insert a new record into my custom object Commission_C. There are no errors in the code, but nothing happens when Policy_C is updated. What am I doing wrong?</p>
  
  <pre><code>trigger statusUpdate on Policy__c (before update) 
  {
      List&lt;Commission__c&gt; comms = new List&lt;Commission__c&gt;();
  
      for(Policy__c a : trigger.new)
      {
         Commission__c comm = new Commission__c ();
         comm.Name = 'testName'; 
         comms.add(comm);      
      }
  
      insert comms; 
  
  }
  </code></pre>
  
  <p>I've googled extensively, and from what I can tell, this seems to be what it should be. I've simplified my code because essentially I just need this part to work to get it all working.</p>