onObjectUpdate() for Salesforce Classic

Usage 

Registers a function to call when case fields, the feed, or related list data have changed on records that are displayed with a feed-based layout.

Use this method with Visualforce pages you want to use as custom publishers in Case Feed.

Note

Syntax 

1sforce.interaction.entityFeed.onObjectUpdate(callback:function)

Arguments 

NameTypeDescription
callbackfunctionJavaScript method executed when the API method call is completed.

Sample Code–JavaScript 

1<apex:page standardController="Case">
2    <apex:includeScript value="/support/api/26.0/interaction.js"/>
3    <script type="text/javascript">
4        var callback = function(response) {
5            alert('Case was updated. Fields = ' + response.fieldsUpdated +
6            ' Related lists = ' + response.relatedListsUpdated + ' Feed = ' + 
7              response.feedUpdated);
8        };
9        //Invokes API method
10        sforce.interaction.entityFeed.onObjectUpdate(callback);
11    </script>    
12</apex:page>

Response 

This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields.

NameTypeDescription
fieldsUpdatedbooleantrue if one or more case fields were updated.
relatedListsUpdatedbooleantrue if one or more case related lists were updated.
feedUpdatedbooleantrue if the case feed was updated.