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
mavsmavs 

Help Needed!!! on List views

we are planning to send emails to the case contacts based on a list view.

I created a listview button called Send Email.

 

Also a list view is created which lists all the cases closed in last 5 days.

 

When GO button is clicked the records will be displayed. I selected 3 records (by checking the checkbox)

 

Now when send email button is clicked i want to send email to case contacts for the 3 selected records.

 

I am planning to do this in visualforce. like calling a visualforce page when send Email button is clicked.

 

But i am stuck how to get the record id's (I need the record id to grab the contactid and case number from case) for the selected records in the list view.

 

 

Can someone please provide me an idea how to achieve this?

 

Your help is greatly appreciated....please advise..thanks

Paul OveryPaul Overy

Take a look at the code here:

http://wiki.developerforce.com/index.php/Checkbox_in_DataTable

 

This code uses a custom class to keep track of which accounts are selected.  You might be able to do something similar

sanjumehsanjumeh

Alternate suggestion which is simple if you know HTML and javascript...

 

You can visualize a VisualForce page like an HTML page and you can write a code to get the selected record IDs by looping through the DOM structure.

Once you have the IDs you can pass them (or the actual Email IDs) as parameters to the next Visualforce page (which sends the Email)