I am trying to access FeedItems and topics(tags) associated to each FeedItem in a chatter Group. I am not able to figure out the relationship between FeedItems and Topics tagged with FeedItem.
I am able to get all the FeedItems in a chatter Group using the following soql Query: SELECT c.id, c.CreatedDate, c.InsertedBy.Name FROM CollaborationGroupFeed c WHERE c.Parent.Name = 'Chatter_Group_name'
Similarly I can get all the Topics using following soql Query:
Select Id, Name from Topic
But i need to get each FeedItem with Topics tagged with it (if any).
Following is the image to better understand it.
I need to get the topics mentioned in the black rectangle.
Can anyone help me to get the Required output? Let me know if Other information is required regarding this.
You need to query the TopicAssignment object like this:
Each TopicAssignment record has a
Name
propertyP.S. You might get more responses by posting on salesforce.stackexchange.com