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

Chatter Feed related to a Record as well as a Chatter Group

Hello everyone,


I have a requirement where with Apex, I was generating chatter feeds and using the ParentId, I was posting it in a Chatter Group. 


Now, the users want that along with posting it in the Group, this feed should also be displayed in a custom visualforce related list on the record detail page. 


To fetch feeds related to a record, I would need the ParentId to be that of the record. This will then not allow me to post it in the group (which I'm currently doing). 


So I need to know if there's a way to post a feed in a group as well as associate it with a Record using Apex?