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
Wim van BeekWim van Beek 

Need to delete feeds and files with apex

I create large amounts of feeds (via groups) including a pdf-file. Works fine.
I need to delete the old feeds and files permantly with apex in a backgroud-process. I manage to delete the feeds itself

delete [SELECT id FROM CollaborationGroupFeed WHERE xx LIMIT 1000];

and they are gone, but the files stay behind occupiing space and they need to go as well.

Cannnot find the right spot to do this.
Best Answer chosen by Wim van Beek
Ramu_SFDCRamu_SFDC
See if the discussion on the below post is of any help

https://developer.salesforce.com/forums/ForumsMain?id=906F00000009A2yIAE

All Answers

Ramu_SFDCRamu_SFDC
See if the discussion on the below post is of any help

https://developer.salesforce.com/forums/ForumsMain?id=906F00000009A2yIAE
This was selected as the best answer
Wim van BeekWim van Beek
This worked for me. I first investigated with force.com explorer but that did not work out. Therefore is was lost, your answer helped me to focus.