-
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
Guided Selling and Complex Billing in Manufacturing with Salesforce
For a manufacturing company, preparing professional and accurate quotes is just as important as other operations. It may sound easy, but as the number of…
Some Common Differences in Salesforce
Let's have a look on some specific common differences that are mostly used on day to day work in Salesforce. 1. Data Loader Vs Data…
The Role of Generative AI in Shaping the Future of CRM
INTRODUCTION Customer Relationship Management (CRM) has shifted from a tool that simply records interactions with consumers to an advanced strategic tool for consumer management. GAI…
Popular Salesforce Videos
Salesforce Stock Pops on Better-than-expected Earnings and Guidance
Salesforce shares rose as much as 3% in extended trading on Wednesday after the enterprise software maker reported fiscal second-quarter earnings and forward guidance that…
Replicate Salesforce Data in Real-Time with Change Data Capture
In this video, we will see how to replicate Salesforce data Migrate your batch processing, scheduled ETL, and nightly workloads to event-driven, real-time integrations using…
Salesforce Tutorial - Creating Custom Object
Many times, New Salesforce Developers don’t understand from where to start it. In this video, I have shown the way exactly to create a Custom…