• Lauren6777
  • 0 Points
  • Member since 2011

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 0
Could someone provide the Apex code for a trigger that automatically pulls the opportunity creator/owner to the sales team on the oppty? 

Here is an example: 

User: John Smith
Profile: CDS

Whenever this guy creates (owns) an oppty, i would like him to immediately be added to the Sales Team with the team role "Sales - CDS"
* all of the team roles say "sales - " and then the department which always matches the profile name.

Can anyone help? :-)