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
sandy ksandy k 

How to update userrole on opportunity split based on Opportunity object stage value is set to closed won or closed lost

How to write apex trigger to update userrole on Opportunity split object when Opportunity object stage value is set to closed won or closed lost.How can I achieve this
PriyaPriya (Salesforce Developers) 
Hey Sandy,

Do you want to update the owner's role on the opportunity when opportunity is closed?

Thanks
sandy ksandy k
Hi Priya. Thanks for your reponse.

I want to update owner's role on opportunity split object which is the child object of Opportunity it must happen when opportunity is closed?