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
Animesh DattaAnimesh Datta 

Query on FeedComment


We have requirement to take copy of deleted feeditem and its comments. As casedelete does not work, we are deleting feedcomments using feeditem trigger. It works only for system admin, but does not work for other users as they do not have "View All Data" permission (Only Admin or users with View All Data permission can query on feedcomment). So is there any way to avoid querying feedcomment while feeditem is fired.

Animesh DattaAnimesh Datta
reason of this my code is running in With Sharing. Please let me know if anyone has solution
James (CloudAnswers)James (CloudAnswers)
This is an old thread, but wanted to lave this in case it's helpful to someone else that reaches it from googling for the error.

Querying FeedItem and FeedComment only work for users with the permission "View All Data" OR in a class that is defined as "without sharing".