Skip to main content
Skip table of contents

Salesforce refused to connect/'X-Frame Options' - deny problem

The problem

When clicking on a Dynamo link/button in Salesforce, user sees the error Salesforce ( or ) refused to connect' page or a blank page instead of the template list or the directed template.


Upon clicking F12 on the keyboard to open the browser developer console, a more descriptive explanation of the error is displayed, which is Salesforce refused to display the URL because it set 'X-Frame-Options' to 'deny'.


Troubleshooting guide

This Salesforce authorization problem can be overcome by using oathLoginURL parameter to override the default Salesforce oauth URL domain. The parameter to specify which environment the org is should also be passed in the URL.

Steps to troubleshoot:

  1. Create a new VisualForce page with the following markup:

<apex:page applyBodyTag="false">
  <apex:stylesheet value="" />
  <apex:includeScript value="" />
      <div class="dynamo-container">
          <div class="dynamo-loading"></div>
          <apex:iframe width="100%" height="100%" src="*&serverURL={!$Api.Partner_Server_URL_330}&id={!$}&templateID={!$CurrentPage.parameters.templateID}&oauthLoginURL={!LEFT($Api.Partner_Server_URL_330, FIND( '/services', $Api.Partner_Server_URL_330))}&sfEnvironment=sandbox"></apex:iframe>

The VisualForce page markup above is meant for a sandbox environment (&sfEnvironment=sandbox). So when moving to live/production environment, please change to &sfEnvironment=production.

  1. Point the Dynamo button to this new VisualForce page. The modified URL for the button should be in the form: /apex/newDynamoFrame?id={!Object.Id} 

When encountering the 'X-Frame Options denied' issue on Firefox (end users see a blank page), it could be due to the Firefox browser blocking some Salesforce content (including embedded Dynamo page).

A user can allow all Salesforce content to be displayed on their Firefox browser by:

  • Click on the shield icon next to the site URL

  • In the opened window, click on 'Turn off Blocking for This Site'

This browser setting will be remembered for Salesforce site and will not block any content from Salesforce site moving forward.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.