-
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
Discover Innovative Solutions for Salesforce Experience Cloud at Dreamforce 2022
Salesforce has been nothing short of revolutionary, since its inception. As the world’s #1 CRM platform, it has connected organizations across the globe with their…
Learn About the Governor Limits in Salesforce
Governor Limits are a set of rules and restrictions in Salesforce that limit the monopolistic use of cloud resources by one or more organizations that…
Campaigns now come to Lightning. But I have got issues
Salesforce Lightning Experience was launched in Winter16 release almost 6 months back. And even after that much time i am still clinging on to Classic…
Popular Salesforce Videos
Get Started with Admissions Connect | Salesforce Tutorial
Ready to simplify the application process and streamline the work of your admissions professionals? Enter: Admissions Connect! This is the purpose-built product built natively on…
Lightning Component In Salesforce
In this video, we are going to look into: Lightning Component Lightning Component features Types of Lightning Component Lightning Component bundle Watch this video and…
Work.com – Release Readiness LIVE, Summer '20 | Salesforce
Work.com is an online set of applications, resources, and content designed to help the entire workplace get back to business after the Covid-19 crisis. This…