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
Abhijit ShrikhandeAbhijit Shrikhande 

How can I get the lead owner's manager's email to display in a formula field?

Is it possible to get the lead owner's manger's email to be displayed in a formula field?

We are trying to send an alert to the owner's manager if a lead has not been worked on in 24 hours after it has arrived. 

How can we go about doing this?

Best Answer chosen by Abhijit Shrikhande
Maharajan CMaharajan C
Hi Abhijit,

Formula(Text) will not be available in the email alert  recipients:

1. So create the Custom Email Field.

2.Create the workflow Field update.
Rule:
Criteria :     Lead: Lead Owner  STARTS WITH   005
Evaluation CriteriaEvaluate the rule when a record is created, and every time it's edited

Field Update :
Choose the newly created Email Field in the Field.
use the formula to set the value : Owner:User.Manager.Email

3. Now you can refer the above Email Field as Email Recipient in the Email Alerts by choosing the Recipient type as
Email Field.

Thanks,
Maharajan.C



 

All Answers

SarvaniSarvani
Hello Abhijit,

You can use time based workflow rules for these kind of alerts. You can specify your condition like if status not changed from "New" with in 24 hours of lead created date, send an alert to owner's manager email. You can access owner's manager email using the formula-->  Owner:User.Manager.Manager.Email . You can have custom field of "Email" type or Formula as you said with return type as text.

Prioir steps: You have to create a workflow with condition if status is equal to "New" with when a lead is created criteria.

Step 1:Navigate through the following fields:

User-added image
Step 2: After you found the email field of manager click insert
User-added image

Step 3: Add your action as email action with time trigger as below
User-added image

Hope this helps, Mark as solved if it did.

Thanks,
Sarvani
Abhijit ShrikhandeAbhijit Shrikhande

Hello Sarvani,
Just to be clear. The steps are
1) Create a custom formula field for the Manager's email on the lead object.
2) Setup a time triggered workflow to send the mail.

Thanks,

Abhijit

SarvaniSarvani
Abhijit,

Step 1: Yes first create an custom formula field to grab the email of manager of lead owner. 
User-added image
Then insert 
User-added image

Click save for your field setup.
Now that you have lead owner's manager email. You have to setup a time dependent workflow rule as step 2

1. Create a workflow rule with criteria when lead is created.
2. if status equal new
3. Time dependent trigger 24 hours after created date.
4. Action as email alert to the custom formula field you setup in step 1.
User-added image

Hope this helps! Mark as solved if it did.

Thanks,
Sarvani
Maharajan CMaharajan C
Hi Abhijit,

Formula(Text) will not be available in the email alert  recipients:

1. So create the Custom Email Field.

2.Create the workflow Field update.
Rule:
Criteria :     Lead: Lead Owner  STARTS WITH   005
Evaluation CriteriaEvaluate the rule when a record is created, and every time it's edited

Field Update :
Choose the newly created Email Field in the Field.
use the formula to set the value : Owner:User.Manager.Email

3. Now you can refer the above Email Field as Email Recipient in the Email Alerts by choosing the Recipient type as
Email Field.

Thanks,
Maharajan.C



 
This was selected as the best answer
Abhijit ShrikhandeAbhijit Shrikhande
When I attempt to add the email alert, I cannot see the formula field I created on the lead object. Am I missing something?
SarvaniSarvani
Create a custom field of type "Email" instead of formula field. You can see the field then.

Thanks,
Sarvani
Abhijit ShrikhandeAbhijit Shrikhande
If I create a custom field of type email, how will it get the value populated? it will be blank, unless I write a trigger or workflow to populate that field.
SarvaniSarvani
Set your default value with the above formula on custom field
User-added image

Thanks,
Sarvani
Maharajan CMaharajan C
Hi Abhijit,

Yes you have to create the seperate Workflow Field Update to populate Email Field.

don't use the Formula field it won't work create Email Field and use the below ways to update this new email Field.


1. Create the Custom Email Field.

2.Create the workflow Field update to populate the Manager Email ID .

Rule:
Evaluation CriteriaEvaluate the rule when a record is created, and every time it's edited
Run this rule if the criteria are met ==>  formula evaluates to true
Criteria :     Rule Criteria    BEGINS(OwnerId, '005')  

Field Update :
Choose the newly created Email Field in the Field.
use the formula to set the value : Owner:User.Manager.Email

3. Now you can refer the above Email Field as Email Recipient in the Email Alerts by choosing the Recipient type as
Email Field.

Thanks,
Maharajan.C
Abhijit ShrikhandeAbhijit Shrikhande
The default value can not recognize Owner:User.Manager.Email as a valid value.
SarvaniSarvani
Please use the workflow rule and do the field update on custom field as Maharajan suggested.  
Evaluation Criteria: When a record is created, and every time it's edited
Rule Criteria: BEGINS(OwnerId, '005') 
Field update : Using the Value: Owner:User.Manager.Email

Thanks,
Sarvani
Maharajan CMaharajan C
See Abhijit it won't work use the WF Field Update to populate this Email Field. And then refer this field in the Email Alert. 

Also Check this checkbox Re-evaluate Workflow Rules after Field Change in the Field Update.

Thanks,
Maharajan.C
Abhijit ShrikhandeAbhijit Shrikhande

Maharajan,

So you're proposing the following solution:
1) Create a custom field of type email.
2) Build a workflow to update this field, when the owner on the lead changes from queue to user.
3) Build a second workflow to send an email.
 

Maharajan CMaharajan C
Yes try that please