7

I'm trying the following SOQL query on the FeedComment object on workbench and getting no records returned, though there are definitely records that should be returned.

SELECT Id, ParentId, RelatedRecordId FROM FeedComment WHERE CommentType = 'ContentComment' AND ParentId IN (SELECT Id from Stipend__c)

no records returned

A similar query works properly on FeedItem.

feed item query

On FeedComment, if I switch the query to filter for a specific ParentId, then it does yield a result.

SELECT Id, ParentId, RelatedRecordId FROM FeedComment WHERE CommentType = 'ContentComment' AND ParentId = 'a094000000HbbAfAAJ'

one record returned

However, if I try to limit the IN clause to a single ID, I get an unknown error / unknown exception.

SELECT Id, ParentId, RelatedRecordId FROM FeedComment WHERE CommentType = 'ContentComment' AND ParentId IN (SELECT Id from Stipend__c Where ID = 'a094000000HbbAfAAJ')

unknown exception

FWIW, removing the CommentType filter has no impact.

My goal here is to find any chatter posts or comments on a specific object that have files attached. We are going to be doing some outsourcing, and these files could have sensitive data that needs to be hidden. I cant just turn off chatter on the object. I could turn chatter off just for the specific users, but would prefer to leave it on.

I have removed the filter on ParentID, retrieved all feedComment records, and am going to deal w/ this in excel, but for some related work on protecting attachments on approved records I need to understand if there is something about feedComment that is preventing me from running this query, or if it could be a bug that I should submit.

And finally, for the record, I do not know my joins well enough to name them - I'm taking that from this fine article.

Thanks

1
  • 3
    Now this is a great example of how to ask a question. Unfortunately, this may be one of those where you will have to open a case with Salesforce as it may be a platform bug. You have done some good debugging here. Maybe one of the gurus will chime in an find the proverbial needle....
    – Eric
    Commented Sep 30, 2015 at 23:35

1 Answer 1

3

Well the 'suggested solutions' on help and training logged their first win (for me) today. I think the 'resolution' is bogus, as querying FeedItem will not get me the results I want. But looks like they are not treating this as a known issue as it will work properly in apex, just throws an error from workbench, dev console, etc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .