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
Devaraj 7Devaraj 7 

how to write a trigger to approve salesperson for opportunity object manually according to stage in salesforce

Shawn Reichner 29Shawn Reichner 29
Are you using territories or have created your own custom territory object?  We may need mor einformation about your request to help fully, but if you are using territories in some fashion, you would have an state for the Opp and then your trigger can locate the User (salesperson) who is assigned that territory and set the Opp Owner when the proper stage of the Opp is populated. 

If you share a little more about your schema and what you have to help trigger this solution, I am sure we can help out with the trigger logic, but I do not thik we have enough information to properly give assistance. 

Thanks,

Shawn