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
Salesforce BlitzSalesforce Blitz 

I need to retrieve the record owners manager name and manager email in merge field in a email template.

I need to retrieve the record owners manager name and manager email in merge field in a email template.
How is it possible..
I have the option of creating 2 fields on object and updating using the workflow..But I need to create 2 fields and hide them n page layout .

Simply I need to retrieve and display in a email template using merge field.

Any immediate help appreciated.
 
AmulAmul
create one email field on Object and update this email field with help of Workflow rule Field update. In this WF Rule you can use nested field.
JethaJetha
Hi in that case you can use Visualforce Email template as below :
 
<messaging:emailTemplate subject="Test" recipientType="User" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
Hello {!relatedTo.Owner.Manager.Name}

Email : {!relatedTo.Owner.Manager.Email}
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

Replace relatedToType="Opportunity" with your own record.

Thanks....