Find your content:

Search form

You are here

What is the best workaround for the lack of the FeedItem/FeedComment trigger firing when you like a Chatter post?


Unfortunately SFDC decided to not make the relevant triggers fire when you like a Chatter post. It also doesn't fire if someone comments on a Chatter post (the FeedItem object has both a LikeCount and a CommentCount field that are being updated).

If we want to do something when these events occur, what our are best options? For comments I suppose we can hook in to the FeedComment trigger and fire something off of the parent, but I can't really think of anything that can be done for likes on posts or comments.

Attribution to: Ryan Elkins

Possible Suggestion/Solution #1

(This is not so much a definite answer, but an approach)

There is always the option of Visualforcing the Chatter tab I guess.

The other option would be to Insert a bit of JQuery into a sidebar component, which binds to the Like links, and on click invokes some code via the AJAX Toolkit or the REST API. (From what I've read you can't do JS Remoting without involving Visualforce)

$("#clicked_link").click(function(){ //Invoke AJAX Toolkit });

Intrestingly, here's the view source of the Like link : Like

THere's a Chatter JS Library at /jslibrary/1349737722000/sfdc/Chatter.js , which should make for some interesting reading to check if it can be leveraged to invoke a bit of custom code.

Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content