I'm wondering if the chatter:feed component in VF can show a single feed item in that feed rather than the whole feed. That is, a single post that has the All Updates > This Update marker at the top.

The component does use the entityId attribute so it makes sense that it shows the record's entire feed. But it looks like the url for a feedItem takes in two parameters: salesforce.com/a0V6F00000ZOer8?fId=0D55D000003SNb0, one for the record and one for the feedItem.

For context, the use for this on my page is that I have a list of records, each row having a button. The button uses jquery to open a popup window with an iframe of that record's chatter feed (which is just another VF page with chatter:feed). I'm displaying the whole feed, but I only need a single post that has a particular topic.

Any suggestions on other ways I can display the filtered feedItem are very welcome :)


1 Answer 1


Since you're looking for only a single FeedItem record, just do a SOQL query for the FeedItem record and render the data on the screen. A FeedItem is a record just like any other; the VF component you're talking about just makes it easier to render complex UI pieces. You're rendering just one FeedItem, so it's probably easier to do the simple query.

Having said that, if you want to do some more finely-grained work, check the Apex ConnectAPI namespace, especially the FeedElement section: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_getFeedElement_1

  • Thanks! Yes, the FeedItem is what I require, and I have been using ConnectAPI. Commented Jan 9, 2018 at 23:58
  • The only question is whether a feedItem can be used in a chatter:feed component. Right now, I'm feeding the object record Id into the entityId attribute to show the whole feed, but only want to show feedItems that are tagged with a particular topic. I can grab those in SOQL, but I cannot figure out how to only display those tagged feeditems. My workaround is to post them as a link feedElement per your link above, then using feedItemType attribute to filter "LinkPost". It's not 100% reliable though. Commented Jan 10, 2018 at 0:09
  • hello, did you find a solution to display with standard layout with like / comment but only displaying a single feed item ? it's not clear as per your workaround ?
    – yeye
    Commented Jan 9, 2023 at 22:45

You must log in to answer this question.

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