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
paul-lmipaul-lmi 

example query of pulling news feed with comments

could someone post some sample code for pulling both the newsfeed (in the workbook already) but with comments?  we'd like to build a more useful mechanism for filtering very busy feeds, but we don't want to lose sight of the comments on the feed posts, since they are just as valuable, or sometimes more valuable, than the posts themselves.

 

also, what is the proper way to query for feed posts to a specific chatter group?

Best Answer chosen by Admin (Salesforce Developers) 
rwoollenrwoollen

 

Have a look at recipe #7 in http://wiki.developerforce.com/index.php/Chatter_Code_Recipes  for the example query.

To restrict to a specific group, you can add 'Where ParentId = <group id>'  to your query.  If you *only* want feed items on groups, then you can just query CollaborationGroupFeed rather than NewsFeed.



 

All Answers

rwoollenrwoollen

 

Have a look at recipe #7 in http://wiki.developerforce.com/index.php/Chatter_Code_Recipes  for the example query.

To restrict to a specific group, you can add 'Where ParentId = <group id>'  to your query.  If you *only* want feed items on groups, then you can just query CollaborationGroupFeed rather than NewsFeed.



 

This was selected as the best answer
paul-lmipaul-lmi

stumbled on the cheet sheet for this while browsing your link.  thanks much!