-
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
Integrating Single Salesforce Org With Multiple Jira Instances with Sinergify
Why the need for different Jira instances within the same organization? As we all know, Salesforce is a CRM platform and organizations use it for…
How Variable Types Operate in the Lightning Component Framework
When writing a component or application, you can set an attribute to have a specific type. But how is the type being used by Aura,…
How to Reach Better User Experience of a Salesforce App with a Webix-based Data Grid
Each growing business should continuously evolve since customers are becoming more demanding every day. As a result, software solutions are becoming obsolete very fast. The…
Popular Salesforce Videos
Salesforce Business Analyst Training
In the 35th Episode of the #AskTheHulk series, Savitha Asked about how to switch to IT from Non-IT background. To this question, Shrey suggested that…
Which Salesforce Certifications are Really Important?
If you really want to know which Salesforce certifications are really important then this video is for you. If you have any doubts or concerns,…
What is Field Dependency in Salesforce and When to use it?
This video gives a complete knowledge of what Field Dependency is in Salesforce. It's divided this topic into 4 major points that are: 1. What…