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
louisecoganlouisecogan 

Mass deleting activities

I have about 200,000 activities in Leads that I need to delete as we have reached storage capacity.
 
I am afraid of deleting the entire lead, not just the activity in the lead!
 
Can you please help, I have installed and run Excel Connector but not sure how to find and delete all the activities without deleting the actual leads.
 
Thanks
Louise
AMartinAMartin

Hi Louise

If you have Enterprise Edition, I would use the Data Loader for this because I think the Excel Connector will limit you to deleting 3000 records at a time.  Also, if you aren't using Excel 2007 you will run into row limits with 200,000 records.

Using the Data Loader.

  • Run a Task report for all Tasks that you want to delete - select only the task id column.
  • Export the report but change the Export File Format from Excel to Comma Delimited csv. (don't open it in Excel)
  • Launch the Data Loader, clicking the Delete button. 
  • Login to the Data Loader, click Next
  • Select the Task object from the Object list and browse out the Task report you just exported. Click Next.
  • Follow the rest of the wizard to delete all tasks in your report

Repeat above steps to delete all necessary Event records.

Using the Excel Connector.

  • Run a Task report for all Tasks that you want to delete - select only the task id column.
  • Export the report leaving the format as Excel.  If you don't have Excel 2007, you are going to encounter row limits of 65535 records
  • Use the Excel Connector on another workbook to link to the Task object selecting only the Task ID column.
  • Copy all the Task ID's from the report to the Excel Connector Task ID column.
  • Highlight the Task ID's and select "Delete Objects" from the Connector menu.
  • If you get a warning that you can delete only 3000 records at a time, try selecting the "Disregard Reasonable Limits on updating records" from Excel Connector Options menu item.
  • If you encounter row limits, you'll have to rerun the report and repeat.

Repeat above steps to delete all necessary Event records.

For something this large, I would also only do a couple of records first to make sure I'm comfortable with the results before I delete 200K records.

Don't forget to backup the Tasks/Events you are about to delete just in case they are needed in the future.

hth.

Aiden

Dev_PeteDev_Pete

Hello Aiden,

 

I have the same problem but I am on Professional edition.  Is there a way to do a mass delete of Tasks with that version?

 

Thanks,

Pete

rpr2rpr2

In Setup, go to Data Management | Mass Delete Records | Mass Delete Activities.

You will only be able to delete 250 activities at a time.

 

Another option is Excel Connector, and there is a version of Professional Edition.  However, it will not be able to access any activities that have been archived (basically any activity completed more than a year ago).

Michael TomarMichael Tomar
In my way of thinking the most appropriate solution is the Skyvia online tool that is limited only by Salesforce Bulk API. There you can create filters to delete only necessary activities. Just click the +Condition button and set the condition for records deletion. Here is their step-by-step guide: https://skyvia.com/blog/how-to-mass-delete-records-from-salesforce-using-sql-or-data-loader