function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
leemeisterleemeister 

Code to add opportunity owner to opportunity team

Hi All,

I'm new to Apex and I would greatly appreciate it if someone could help me out with code that adds the opportunity owner to the opportunity team.

Thanks!
kevin lamkevin lam
You don't need to do this, it's added automatically every time an opportunity is created.