-
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 Batch Apex in Salesforce? How to Execute Batch Apex Class?
Batch Apex In Salesforce If you want to process a large number of records every day or within a certain time interval, you may encounter…
Salesforce to Salesforce Integration Using SOAP API
Introduction to SOAP API SOAP API stands for Simple Object Access Protocol API which supports XML only. It can be used to create, update, delete,…
Popular Salesforce Videos
Provide Stellar CX With Grazitti | Be Salesforce Ready
Brands, nowadays, need to build powerful customer relationships and provide experiences that meet and exceed expectations. With evolving technologies, customers hate to stay in queues…
The Rise of Salesforce
Salesforce is a cloud computing service as a software (SaaS) company that specializes in customer relationship management (CRM). Salesforce's services allow businesses to use cloud…
Salesforce Pay Expectations $$$ US and UK
Do you agree or disagree with these numbers? How do you think Mason Frank could have surveyed differently? In this video, Brad discusses just how…