Is it possible to refresh the parent window from a Canvas App embedded inside a page layout? Considering the canvas app is stored on an external system, I receive a cross-origin error when doing so.

 Uncaught DOMException: Blocked a frame with origin "https://salesforcehook.rapdevs.com" from accessing a cross-origin frame.

Here's what I've tried:



1 Answer 1


Try to put your canvas into visualforce page, and in this visualforce subscribe event from canvas app. When you receive event you can refresh the page. Visualforce page will be in page layout.

This is the part(javascript) for visualforce:

Sfdc.canvas(function() {
    Sfdc.canvas.controller.subscribe({name : 'refreshThePage', onData : function(e) { window.top.location= 'your url - for example your record id'; }});

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .