You need to sign in to do that
Don't have an account?
sfdc fresher
send the email to related contacts of accounts in batch as part of Finish method
Hi all,
I have a requirement like: Whenever the Accounts are updated , related contacts should get the mail from Finsh method in Batch apex.
Could you please help me in this.
thanks,
Padmavathi Ch
I have a requirement like: Whenever the Accounts are updated , related contacts should get the mail from Finsh method in Batch apex.
Could you please help me in this.
thanks,
Padmavathi Ch
May I suggest you please check with below link from the forums community with a similar discussion which might help.
- https://developer.salesforce.com/forums/?id=906F000000090OfIAI
Please let us know if this helps.Kindly mark this as solved of the reply was helpful.
Thanks,
Nagendra
am using below code, email sent to targedtted contacts,but unable to see Email temple for that contacts.Where can I check these contacts?
public class MassEmailMessagingApex{
public void SendEmail() {
List<contact> lstcon=[Select id from contact limit 2];
List<Id> lstids= new List<Id>();
for(Contact c:lstcon) {
lstids.add(c.id);
}
EmailTemplate et=[Select id from EmailTemplate where name = 'CourseName_Fee' limit 1];
Messaging.MassEmailMessage mail = new Messaging.MassEmailMessage();
mail.setTargetObjectIds(lstids);
mail.setSenderDisplayName('System Admin');
mail.setTemplateId(et.id);
Messaging.sendEmail(new Messaging.MassEmailMessage[] { mail });
}
}