---
schema_version: "1"
id: 8638ce58195a79f349e3b8486cfbfa307911603e2980847fd000e77cc9d48133
title: refreshObject() for Salesforce Classic
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/api-cti/guides/sforce-api-cti-refreshobject.md
canonical_url: https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshobject.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: e1795028c32eeb8ddafa20503d33dd23913e7d806e30cef0459bdf3859a230a8
products:
  - Open CTI Developer Guide
  - Service Cloud Developer Content
---

# refreshObject() for Salesforce Classic

## Usage

Notifies a page that uses a feed-based layout, that fields, the feed, or related list data has changed, and forces an update of these on the page. Use this method with Visualforce pages you want to use as custom publishers in Case Feed.

## Syntax

```javascript
sforce.interaction.entityFeed.refreshObject(
      objectId:string,
      refreshFields:boolean,
      refreshRelatedLists:boolean,
      refreshFeed:boolean,callback:function)
```

## Arguments

|Name|Type|Description|
|------|------|-------------|
|`objectId`|string|The record ID of the case object.|
|`refreshFields`|boolean|Indicates that one or more fields on the case have changed.|
|`refreshRelatedLists`|boolean|Indicates that one or more case-related lists have changed.|
|`refreshFeed`|boolean|Indicates that the case feed has changed.|
|`callback`|function|JavaScript method executed when the API method call is completed.|


## Sample Code–JavaScript

<!-- javascript set_clipboard -->
```javascript
<apex:page standardController="Case">
    <apex:includeScript value="/support/api/26.0/interaction.js"/>
    <a href="javascript:void(0);" onclick="sforce.interaction.entityFeed.refreshObject('{!case.id}', true, true, true, function(response) {alert('Case was updated: ' + response.result);});">Refresh Case</a>
</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.

|Name|Type|Description|
|------|------|-------------|
|`result`|boolean|`true` if the Case Feed page was successfully updated, `false` if it was not.|


