I would like to query feed items on a specific community, but can't figure out how to do so in SOQL.

For example, this query returns no results.

SELECT Id,Body,NetworkScope
FROM FeedItem
WHERE NetworkScope='123123123123123'

According to some documentation (SOAP API - my question isn't specific to the SOAP API, I'm just pointing this out), the NetworkScope field cannot be used in filters, so I understand why the above query won't work, but I can't figure out what the correct query would be.

For SOSL queries, I found documentation on WITH NETWORK that does work, but I can't find any equivalent for SOQL, and since SOSL requires a text string to search I can't just use that instead.

Is the type of query I want possible?


1 Answer 1


This is a known issue:


Until this is fixed,


Remove the filter out of the SOQL query and filter in code.

Leaving your SOQL as you had originally formulated it.

SELECT Id,Body,NetworkScope FROM FeedItem

or SOSL:

FIND {query} IN ALL FIELDS RETURNING FeedItem(id, body, Networkscope)

+ Custom Logic on the results to filter on NetworkScope

You must log in to answer this question.

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