0

I am trying to open an external url (say a particular wiki page) in one of the tabs inside salesforce on click of a button.

I have added "https://en.wikipedia.org/wiki/" in CSP trusted sites & I used the follow code in the onClick function:

var workspaceAPI = component.find("workspace");
workspaceAPI.openTab({
       url: "https://en.wikipedia.org/wiki/Salesforce.com",
       focus: true
})

A tab is opening on the button click, but the tab is blank with no information.

Error: Refused to display in a frame because it set 'X-Frame-Options' to 'sameorigin'

0

He Nidhi. That's actually an error that's based on the other server's settings: It's set not to allow its pages to be displayed in an iFrame on a page that isn't in the same domain as the page you're loading.

As far as I know, there isn't a way around this...and even if there were, we should respect the author's desire.

Sorry for the bad news. :(

  • Hey Nidhi -- were you able to find another solution? – Shane Steinfeld Sep 30 '18 at 21:35

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.