function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suresh Kumar 34Suresh Kumar 34 

How to send an email for selected account contacts.

Hi Guys,

I have developed custom vf page with list of accounts.

My reqirement is to send the email to contacts associated with the accounts,by selecting the account in vf page.please help me achieve this.

Thanks,
Suresh. 
Onesh ReddyOnesh Reddy
Hi Suresh,

Create a Wrapper class with Checkbox and Account so that every Account has a checkbox.When the checkbox is checkedin(True) for Account pass the values to the controller and send an Email.

Please find the links on Wrapper class:
http://www.salesforcetutorial.com/wrapper-class-wrapper-class-example/
http://www.forcexplore.com/2014/07/wrapper-class-in-salesforce.html
https://developer.salesforce.com/page/Wrapper_Class
https://developer.salesforce.com/forums/?id=906F00000005FGrIAM


Let me know if it helps you.

Regards,
Onesh.K
saikat sarkarsaikat sarkar
Pass back the Selected Account Ids to the Controller and in controller fetch all the Child Contacts of the Accounts and send email.