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
Dan Dodd 3Dan Dodd 3 

send email to a related list

I want to send emails to all contacts on the cases in a related list.
We are adding a follow up object that contains the topic for future follow up. For example when we start up the tours again. People want to be notified when we start planning the next tour but it is not on the schedule yet.
We want to email them as a group with the information.
I can add a button to the related cases of a Follow up using the answer here: https://developer.salesforce.com/forums/?id=906F00000008z0FIAQ but still need to know how to make that email the cases contact.
 
ShirishaShirisha (Salesforce Developers) 
Hi Dan,

Greetings!

You can achieve this by creating a Visualforce page: 
This is a related list like a Vf page that is embedded in the page with one or two additional buttons to send email.
you will embed this at the bottom of the Detail page
On the VF page, there is list of related records, this is a custom pageblock table with a wrapper checkbox.
This VF will have an extension class method that gets invoked on the click of custom button 'Send Email'.

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri
Joe James 16Joe James 16
Hello there Dan, 

Good tidings! 

You can accomplish this by making a Visualforce page (https://sekho.com.pk/): 

This is a connected rundown like a Vf page that is implanted in the page with a couple of extra fastens to send email. 

you will insert this at the lower part of the Detail page 

On the VF page, there is rundown of related records, this is a custom pageblock table with a covering checkbox. 

This VF will have an expansion class technique that gets summoned on the snap of custom catch 'Send Email'. 

If it's not too much trouble, mark it as most appropriate answer on the off chance that it assists you with fixing the issue. 

Much thanks to you! 

Respects, 

Joe James
Dan Dodd 3Dan Dodd 3
Thank you Shirisha and Joe.
Joe your VF page  link took me to an expected site, not a Salesforce site at all.

My custom object is Followup lutd_Followup__c
My custon field in Case that looks up into Followup is FollowupEmail FollowupEmail__c
So I create a VF Page 
<apex:page standardController="lutd_Followup__c" >
    <apex:relatedList list="Case" />
</apex:page>

and get the message 
... not a valid child relationship name for entity 
Dan Dodd 3Dan Dodd 3
As you can tell I am stuck at getting the first part done.
The relationship between Followup and Cases does work, I have a standard Single related List for "Cases" on the same tab

I have tried Case Cases Followup Followup__c Followup__r 
and get the message 
... not a valid child relationship name for entity 

I placed it in the related tab and the detals tab and get the same result.
Dan Dodd 3Dan Dodd 3
First hurdle passed:
<apex:page standardController="lutd_Followup__c" >
    <apex:relatedList list="Case__r" />
</apex:page>

But this sure is funny looking output.
Now attempting to add the button that will call the custom class. as per:
Shirisha
This VF will have an extension class method that gets invoked on the click of custom button 'Send Email'.

So far I have a button on the page that calls a method in the extension class
looks funky, how to remove New Case button
User-added image
might be better if I removed the Send Email in VF Page Button
and make the existing Send Email button work where it is.
  
Miss NaheedMiss Naheed

Thanks every body to set me things (https://he.com.pk/). and this is one of the major reason that i love to be here through which one will get a healthy information. thanks everybody who contribue in this matter.