-
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
Boost your Business Growth with Salesforce Easy
In this competitive edge, we are continuously advancing in technologies and seeking solutions to grow our business to get ahead in the corporate world. Various…
9 Reasons Why Salesforce Is The Best CRM In 2021
Well, owing to the bulky data back in the past, there was a need for cloud computing. Additionally, the list of customer concerns, supporting them…
Salesforce Marketing Cloud Automation Studio and Its Activities
Automation Studio Automation Studio is a very awesome tool in Salesforce Marketing Cloud. One can perform lots of tasks via automation studio. It helps us…
Popular Salesforce Videos
What is CRM and How Does it Work? | Salesforce
What is CRM (Customer Relationship Management) and how does CRM work? Watch this video to see how CRM helps you keep track of everything about…
Write Tableau CRM Data to Salesforce Objects
Use Tableau to blend Salesforce data from across the Customer 360 platform with your other business data for increased visibility and a deeper understanding of…
What is Salesforce Roles? Explain in Details
Salesforce Roles deals with the hierarchy of your organizations, So it will actually be based on the record level access and it can override the…