Hi Please let me know the Solution Design for below scenario:

Scenario: In salesfoce Account detail page , I have a custom button which when click opens a different website in Iframe . Now from this external/different domain website , I want to get back to parent Account detail page by some event/button of this external/different domain website.

Please let me know how to design/develop this scenario.


  • Assuming you control the site, the answer here is correct. If not, you may not be able to do so, because frames can't talk to each other across domains without cooperation from both sides.
    – sfdcfox
    Jul 17, 2014 at 16:47

1 Answer 1


Have a look on window.postMessage() - a way of controlled XSS:


Please consider potential security impacts! The Salesforce XSS protection comes for a reason.

Especially if you use * as origin, you run into risks. I would only use this, if I control (own) the external site. Otherwise you have to trust them completely.

You must log in to answer this question.

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