-
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
What is the Database.Stateful Interface in Batch Apex?
We know Salesforce has a powerful way to do bulk processing with Batch Apex. However, I rarely come across scenarios where Database.Stateful is needed. Batch…
Salesforce Sandbox Types | What Does the Platform Offer You?
Having functional, friendly, and safe test environments is indispensable in any industry. You can be an administrator who needs to configure different options and add…
System Events in Salesforce - Learn All About it Here
The Lightning framework fires system events automatically during component initialization, attribute value changes, rendering, and so on. In their HTML markup, all Components can register…
Popular Salesforce Videos
Apex Classes and Apex Triggers in Salesforce
In this video, Salesforce developer Artem will demonstrate real-world applications of both Apex classes and triggers with practical business scenarios. Apex classes and Apex triggers…
TrailheaDX '18 Opening Keynote - Part 3: Connect Every Experience
Salesforce TrailheaDX ’18 Opening Keynote – Part 1: Create Connected Customer Experiences TrailheaDX ’18 Opening Keynote – Part 2: Salesforce Platform Salesforce TrailheaDX ’18 Opening…
Algoworks is Now a Salesforce Gold Partner
Being just a registered partner back in 2013, the journey to striking Gold in 2020 has been long. On the way to getting that Gold,…