-
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
The Most Important Pardot Automation Rules You Need to Know in 2023
Pardot is a powerful marketing automation platform that enables businesses to streamline their lead generation and nurturing efforts. One of the key features of Pardot…
All You Need to Know About Reports and Dashboards in Salesforce
Dynamic Dashboard – An Overview A unique dashboard is a powerful device to break down business measurements for all intents and purposes. It permits organizations…
5 Reasons Why You Need an Customizable Idea Management Tool for Your Online Community | Salesforce
Innovation is universal; and so are ideas. As an organization, you never know when you’ll hear a great idea. In fact, no idea is insignificant.…
Popular Salesforce Videos
MuleSoft Integration: Google Ads Lead Form to Salesforce - Learn Salesforce Series by Algoworks
MuleSoft integration: Google Ads lead form to Salesforce. In this video, learn how MuleSoft can be used to integrate Salesforce with Google Ads lead form.…
Career in Salesforce in 2022
In this video, Shrey is talking about starting your career in Salesforce. Here are the different career choices you have or different profiles that are…
Security for Salesforce Developers: Data Security
In this series, we review the most important concepts that developers must understand to create secure applications on the Salesforce platform. We talk about data…