I need to access feed items based on Topic. As in salesforce chatter we post feed, with that we can add #Topic to the feed. There is a field called "ParentId" on Feeditem which is reference to many objects including "Topic" object. But if I am querying as follows I am not getting any result.

SELECT TYPEOF Parent WHEN Topic THEN Id,Name ELSE Name,Id END FROM FeedItem where ParentId = '0TO90000000TzS9GAK'

instead of there is a feed item with Topic(Id = 0TO90000000TzS9GAK).

1 Answer 1


Topics and Feed-Item are tagged in Topic-Assignment Object. You can query on this Object to get the Mapping of the related Feed-Item with Topics.

Thanks Gautam

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.