Refresh Detail Page Fields from Custom Quick Action

If you want to update information displayed on the detail page or the feed view on an object after updating the record from a custom quick action visualforce page, then you can you the below snippet which uses the Canvas / Publisher API.

//Publisher JS Library
<apex:includeScript value="/canvas/sdk/js/publisher.js" />

//Action Function
<apex:actionFunction name="executeUpdate" action="{!updateCaseClassification}" oncomplete="refreshFeed();">

function refreshFeed() 
{
    Sfdc.canvas.publisher.publish(
    { 
        name : 'publisher.refresh', 
        payload : { 
            feed: true, 
            objectFields: true
        }
    });
}

Leave a Reply

Your email address will not be published. Required fields are marked *