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'

1 Answer 1

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. :(

1
  • Hey Nidhi -- were you able to find another solution? Sep 30, 2018 at 21:35

You must log in to answer this question.

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