+ Start a Discussion

Count "Likes" from Chatter

I posted this in formulas and validation rules -- was wondering if there is a away to know what post is most popular -- of all time, for the day, etc, based on the number of likes a post gets.


Thanks for the help!


You can not query the FeedItem directly without an id filter, but I suspect you only really want the most popular post for a particular feed like Contacts etc. In this case you can perform a SOQL query like the following:


SELECT Id, Likecount from <EntityFeed> order by Likecount

Larry WieskopfLarry Wieskopf

Can the like count be used someway to execute a trigger when a feed is liked?


Example - When an invoice gets created a chatter feed is created with the attached pdf.

The approvers see the feed in chatter and "Like" to approve the invoice (Note we are not using approval process for this it just updates a Status field on the custom object)


Once liked a trigger code would update this status field.  It can be done if we type YES in the comments and launch the trigger based on comments, but the ideal would be to launch the trigger when the feed is liked.