-
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
Transforming Healthcare with Salesforce: How Salesforce Can Help Providers Achieve Their Goals
Salesforce is a leading customer relationship management (CRM) platform that has revolutionized how businesses manage customer data and interactions. However, Salesforce doesn’t just help businesses…
Salesforce Introduces the AI Suite Agentforce to Increase Worker Output
Discover how Salesforce is transforming the future of business with Agentforce, a groundbreaking AI solution introduced at Dreamforce 2024. Designed to supercharge productivity across sales,…
Salesforce Connectivity Instructions for SpringCM
The Salesforce tool known as DocuSign CLM Files connects your Salesforce and DocuSign CLM businesses. Depending on the security access defined by administrators, authorized users…
Popular Salesforce Videos
Easy Salesforce Lightning Experience Tricks for Admins
Learn how to enhance the screens for your end users by leveraging Related List - Quick Links, Report Charts and dynamic filters to show the…
Experience the Most Flexible, Easiest, and Securest Way to Integrate Salesforce and Jira
Integrate standard and custom Salesforce objects with Jira to strengthen cross-functional collaboration and deliver a top-notch customer experience. Fast-Track Your Journey to Attaining Customer Centricity…
Salesforce Administrator Preparation - ADM 201
Salesforce Administrator Certification exam does not require any specific pre-requisites. But any working knowledge as an administrator or a developer or a functional consultant will…