-
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
5 Reasons To Use Salesforce As Your Healthcare CRM
Although many may argue that businesses across all sectors are similar when it comes to certain factors or essential operational aspects, there are some businesses…
Salesforce and Workday Collaboration: Launching a Joint AI Initiative
Salesforce and Workday partnership, two leading cloud-based platforms, have announced a strategic partnership that brings together their strengths in AI and data management. This alliance…
9 Common Business Problems Solved via Salesforce Consulting Services: Full Guide
9 Common Business Problems Solved via Salesforce Consulting Services: Full Guide Introduction: Get the Key to Business Growth with Salesforce Consulting Services The modern company is under…
Popular Salesforce Videos
Traditional AI vs Generative AI | What the difference? | Salesforce
Explore how traditional AI differ from Generative AI from this extract from our latest webinar! We're going to explore the strengths and not-so-strong points of…
How Cyntexa Helped Diet Meal And Food Ordering Service Providers Offer Their Users The Ability To Order Online | Salesforce
It is important to keep your business at the top with the latest technical advancements. Presenting you a case study showcasing how Cyntexa Helped Diet…
How To Create Workflow Rules In Salesforce | Salesforce Workflow Rules
This video walks through the steps to create a Workflow Rule within the Process Automation section of Lightning Settings in Salesforce. Get answers to the…