1

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.

Thanks

  • 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 '14 at 16:47
4

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

https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage

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.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.