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
DSimpsonDSimpson 

How to detect group a FeedItem was posted to

I'd like to detect which group a feeditem was posted to, and then use that information programmatically in a trigger. Is there a field on FeedItem taht tracks which group it was posted to? Or would I go through another means?

Best Answer chosen by Admin (Salesforce Developers) 
ChrisOctagonChrisOctagon

The "ParentId" field should give the ID of the record whose feed the feed item was posted on.

All Answers

ChrisOctagonChrisOctagon

The "ParentId" field should give the ID of the record whose feed the feed item was posted on.

This was selected as the best answer
DSimpsonDSimpson

So that would equal the "group id" (g=xxxxxxxxxxxxxx in the URL)?

ChrisOctagonChrisOctagon

Yes, it should