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
GauravKumarGauravKumar 

Mass Update Button on Activities For Task

Hi,

 

 I have created Mass Update Button Name "Close".

I want to Mass Update Task Status on "Close" Button Click.

how can i do this ?

 

and when i have fetch task List then it gives error 

 

"List controllers are not supported for Task" .

 

Then how can i fetch task list for Mas Update of Task Record.

 

can anybody help me plz ?

 

 

soofsoof

It seems like you're using a the Task standard controller - is that correct?  Try creating a custom controller instead and fetch the Task records that you want to update via SOQL.

 

If this doesn't help, post a few more details about your requirement.

 

-soof 

GauravKumarGauravKumar

Basically i want to perform Mass Update on Task for update status. for this i have create List Page Button, on this button click, this will redirect on Vf page and where on page load selected task status will updated and then after update of selected Task status this will redirect on our Activities List Page

 

For eg. i have used this one in my code . i have called {!updatetask} action on page load and this will update selected task status and then redirect to ActivitiesTab Page.

 

 

 

ApexPages.StandardSetController con; public extActivitiesClose(ApexPages.StandardSetController controller) { con = controller; } private List<Task> listSelectedTask; public PageReference updatetask() { listSelectedTask = (List<Task>) con.getSelected(); if (listSelectedTask != null) { for (Task t : listSelectedTask) { t.Status = 'Completed'; } update listSelectedTask; } PageReference p = new PageReference('/apex/ActivitiesTab'); p.setRedirect(true); return p; }

 

i have used salesforce default ListView for showing Activities List.

can you help meand how can i perform Mass update on Activities ?