-
How can i show Record Owner name in From/Reply in Email sent through Salesforce?
I want to show Record Owner name in From/Reply in Email sent through Salesforce. Can anyone help me in achieving this thing?
Here is my code----
list<String> listOfEmailsAddress = new list<String>();
for(Lead leadobj : leadList){
String [] toRecipients = new String[] {leadobj.NominatorEmail__c};
Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
email.setToAddresses(toRecipients);
email.setSenderDisplayName(leadobj.Owner_Name__c);
email.setTargetObjectId(leadobj.Id);
email.setUseSignature(false);
email.setBccSender(false);
email.setSaveAsActivity(true);
email.setTemplateId(templateId);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});
}
Log In to reply.
Popular Salesforce Blogs
Salesforce Lightning Web Components Developer Guide Chapter 2: Markup Basics
Here is the second article in our series, where we delve into the LWC basics. In the previous article, we discussed the basic principles and…
5 Things You Need to Know about Salesforce Commerce Cloud
Salesforce Commerce Cloud, formerly known as Demandware, is a robust and scalable cloud-based platform designed to empower businesses with advanced e-commerce capabilities. As an industry-leading…
Custom Roll-up Summary on Account Object | Salesforce Developer Guide
In this blog, I would like you to share, how to display a custom roll-up summary on account, Before moving to code first create a…
Popular Salesforce Videos
Case Management App on Salesforce AppExchange
Is your customer support struggling with customer satisfaction for high service cost? Don't know how to work on right priority cases? Don't worry Algoworks presents…
Can a Housewife Make Career in Salesforce?
Wondering if a Housewife can make a career in Salesforce Join this user group for Salesforce job & career info and learn all you need…
Approval Process In Salesforce | Salesforce Development Tutorial
Approval process in Salesforce. This video will cover the following points - 1. Approval Process Learn how to create an approval process. 2. Manage Approval…