• salesforcesaint
  • NEWBIE
  • 0 Points
  • Member since 2012


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I'm somewhat familiar with Triggers but I'm having a hard time with this one, and I'm not even sure it can be done.

Since I can't use workflows to automatically update a lookup field, I want to create a Trigger to update the lookup field of a standard object (Lead) with the ID/Name of a custom object (Employee) based on the value of a custom field within the Lead object.

In short, my Employee object is related to Leads and I'd like the trigger to use the value of the custom field (EmployeeName__c) in Lead to query the Name field in the Employee custom object to retrieve and store the ID of the Employee record in the lookup field within Leads called Employee__c.

Any thoughts?

T