-
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
Populating Salesforce Data into a Table element
Every product is investing huge effort in creating a nice user interface, making it “sexy” and inviting. There is no doubt that customers and service…
How to use Leaflet Map in Salesforce?
Leaflet Map: Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. The leaflet is designed with simplicity, performance, and usability in mind. Let's…
Popular Salesforce Videos
8 Steps to Become a Salesforce Developer!
Do you aspire to become a Salesforce developer? Are you stuck on what next steps you need to take to become a developer? Check out…
Fireside Chat with Arundhati Bhattacharya, CEO Salesforce India
Meet the new Chairperson and CEO of Salesforce India Arundhati Bhattacharya. Tasked with further leading our growth and expansion throughout the country, Arundhati will be…
The Decorator Pattern in Salesforce | Design Patterns | Salesforce
It attempts to solve the issue where you need temporary fields for processing (typically in Visualforce/LWC/Aura) but does not need to add these fields to…