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
championchampion 

How to delete multiple chatter files at once...??

Hi,

 

I have unnecessary files posted via chatter under Files object. Can any body help to delete  the unwanted files at one shot.

 

 

Abdul.

Jia HuJia Hu
You can use Apex to delete multiple files at once from the ContentDocument object, like,

List<ContentDocument> cdlist = [Select Id, Title from ContentDocument order by createddate desc limit 3 ];
delete cdlist;

doc,
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contentdocument.htm