Blog

Archived Activities 365 Days

0

In my last entry I talked about how salesforce calculate data storage, and this came about due to an issue we had with task records taking up 4Gb of data storage (for 360k tasks).

Since then I have discovered that salesforce automatically archive activities over 1 year old (365 days), so there were actually a great deal more records in the task table than were being made visible. For all those admins out there, note that you can request to have your archive days increased, allowing those records to be easily accessed via reports, data loader or other means.


So what gets archived and when?
For All Editions, Salesforce archives older activities according to the conditions below:

* Events with a due date greater than 365 days old
* Closed tasks with a due date greater than 365 days old
* Closed tasks without a due date that were created more than 365 days ago

Where does my Archived Data appear?
Archived activities can be viewed only in export files, printable view, or by clicking View All on the Activity History related list. Note that you cannot extract archived activities using the data loader.

How do I delete Archived Activities?
Administrators can delete archived activities using Mass Delete.


Now this is not a ‘feature’ of salesforce.com that I like. I assume that they do this to prevent customers running reports against millions of task/activity records (typically the highest volume in any org), thus preventing unneccessary load on their hardware… however they are still charging premium rates for this data storage even though it is not immediately available to the client (I must reiterate that you CAN request that the 365 day limit is increased).

Here’s the thing – lets say I want to run a report to compare a certian activity with the same period a year ago (I imagine this is a fairly common report required out of any CRM)… so I want to see all the calls made last month, compared with the same period last year and perhaps even the year before that. Not possible, at least not without first requesting to extend your activity archive days because archived tasks are not included in reports.

So next time that you run a SOQL ‘select count() from Task or Event’ just remember that it will exclude any archived records.

Note: For fellow geeks, you can access archived activities (as well as deleted records) using QueryAll() – http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_queryall.htm