title: Apex trigger - 2 custom objects - populate 1 field in objectA with a value (currency) from Object B
body: <p>I am a beginner on this apex endeavours. I can interpret code but I struggle on creating it.</p>
  
  <p>So I just need to <strong>understand how to create the subject explained trigger.</strong></p>
  
  <p><strong>NOTE</strong>: there is a condition that states for this to happen if the field is different from <code>0</code>, but it is not necessary.. as long as it updates it with the value on the <code>fieldb</code> on object <code>b</code> is enough.</p>
  
  <p>If you can provide comments on all the steps for me to understand the why, that would be great</p>
  
  <p>I came up with this, but it is obvious that it is not working: </p>
  
  <pre><code>trigger PopulateOrderValue on ObjectA__c (after insert)  {
     FieldA__c  A = Trigger.new
     ObjectB__c.FieldB__c != 0 
  {
     A = ObjectB__c.FieldB__c
     update A;
      }
  }
  </code></pre>