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
Baguiar2Baguiar2 

Email on Workflow to record Owner and Manager on role hierarchi

I've been looking aroud to check if is possible to send an email to the Opportunity Owner Manager, according to the ROle Hierarchi. I've setup the rule already to send the email to the Oppt owner. So I need to add the people on the imediate role above the Oppt owner on the emal.

 

Is is possible ?

 

Thanks!

B

skodisanaskodisana

Hi,

 

Create  a new Email filed on Opportunity called Manager's Email and populate this filed using trigger on opportunity with Opportunity Owner's manager email. Since Role is associated to multiple users you can use Manager field on User object.(This should be populated manually)

In the workflows select Recipient Type as email field and select Manager's Email in the Selected Recipients.

 

Thanks,

Srikanth. K

Edwin VijayEdwin Vijay

I don't think youv'e got a straighforward method here... The manager's role might have multiple users assigned to it, so you would have to add all these users to the email

 

Sending an Email through triggers would be best for this situation..

 

However, using the Manager field on the User object looks more ideal

Baguiar2Baguiar2

Thanks Guys. Good ideas and I thought about building a trigger but the issue is that it is a time-based workflow. Trying to avoid writting another trigger on the opportunity and thought about a formula or somthing. If I have ot build a trigger, definetely the manager field should be the way to go. Although that field is not populated and the Role hierarchy, although it might be a group of people, would be the best solution.

 

You can pick a whole Role to send the email, but NOT the specific Role above the record owner ...

B