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
satheesh k 18satheesh k 18 

Opportunityshare object

Hi team,
In opportunity object I have created new user lookup field that is "second owner".
if user select the second owner(user lookup) field and create new record on opportunity object.
automatically give read access to the second owner on this opportunity record.

Note:opportunity owd is private.

Please help me 

Sathish k
John ClevelandJohn Cleveland
You can do this with a trigger that calls an apex class and have the apex class insert the opportunityteammember record and the opportunityshare record.
satheesh k 18satheesh k 18
Hi john,
Thank you very much for your response.
Can you please provide sample code for related this requirement.