Could you please suggest on this?

Requirement is to create a "News Feed" page for records from two custom objects. I am able to use a component to get the feeds for records from one object but could not use an additional chatter:feed component for another custom object since the page limits does not allow to use more than chatter component in the same page.

Hence, I thought to find a way to use one chatter component , but dynamically reassigning the object for which the Chatter feed will present it's information.? But I am little confused with this thought too since the default page itself should list the feeds related to both the objects. Any suggestion please how we can approach this scenario?

Thanks in advance!


There isn't a way to custom aggregate FeedItem's from two separate parents using the Chatter Feed component. You can have only one EntityId, which can be a group, topic, user or record.

One idea to workaround this is to auto-assign the posts (with an apex trigger) on those two records to a topic and you could use the Chatter Feed component to show the topic feed. Then EntityId field that points to the parent for the feed can accept a Topic Id.

  • Sorry for the late comment. But I am not very sure if I am clear and could go with the above approach. However I would like to add some more detail into my query to give more information. Currently, the record-id of selected record belong to Object-A is passed to the controller thro an actionfunction and same is assigned to the entity-d in chatter:feed component. Hence I am trying to find a way to invoke controller method dynamically based on the record selection either from Object-A/Object-B. EntityId can be one but Is it possible to link two different SOQL queries based on selection?. Help! – vedakri Jul 4 '14 at 10:00
  • What you're asking for is not possible. One hack workaround is to use a trigger to assign records a topic and use the Chatter feed component to surface the topic feed. Otherwise you are building your own Chatter feed UI using Visualforce. – greenstork Jul 7 '14 at 15:52

It's simple enough to fetch both objects in a custom controller (or controller extension) and put both feeds on the same page.


public class with sharing MyController {
   Account theAccount;
   Contact thePrimaryContact;
   public MyController() {
     // do stuff to initialize the Account and Contact...


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.