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
Matthew SoutherMatthew Souther 

SOQL query for FeedItem posted by Communities user - no results

When I post to a case's Chatter feed as an internal user, I am able to return a FeedItem for the record with this SOQL query:
SELECT Body,Id FROM FeedItem WHERE ParentId = '500q0000009Xf8AAAS'
When I log in to our Partner Community as a communities user and do the same thing (on the same case), the post is visible on the case feed, but the above query does not return the new post.

How can I access feed items created by a community user in code?
Best Answer chosen by Matthew Souther
Matthew SoutherMatthew Souther
Thanks Nagendra, this was an embarrassing false alarm actually.

The problem was that I had actually posted a FeedComment to an existing post in the Communities context, not a FeedItem (primary post).  When I posted a true FeedItem later, it was returned by the query.

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Matthew,

Sorry for this issue you are encountering.

May I suggest you please check with below link from the stack exchange community with a similar discussion and a suggested workaround which might help you further. Please let us know if this helps.

Kindly mark this as solved if it's resolved.

Thanks,
Nagendra
 
Matthew SoutherMatthew Souther
Thanks Nagendra, this was an embarrassing false alarm actually.

The problem was that I had actually posted a FeedComment to an existing post in the Communities context, not a FeedItem (primary post).  When I posted a true FeedItem later, it was returned by the query.
This was selected as the best answer