• Shawn@Cliffs
  • 0 Points
  • Member since 2013

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 1
I'm new to Apex and I've looked at the online references but need help for my first code. What I've got is a lookup field, Master_Account_Name__c on the Account object that looks up a custom object MasterAccount__c. Each object has an external ID field: Master_Account_ID__c on the Account Object and Account_ID__c on the Master Account Object.
What I want to do with a trigger (after insert, after update) is to populate the lookup field, Master_Account_Name__c on the Account Object with the correct id from the Master Account object to create the relationship (where the external ID fields are the same).
This will be used in nightly batch updates after upserts occur to each of the objects with master accounts being upserted first. Any help with this greatly appreciated.

Message Edited by Redtag on 07-13-2008 05:00 AM