Articles in this section

How to Resolve the Refused to Connect Error in Salesforce ?

Published:

This issue may occur in the following scenarios:

  1. After completing a Template Send.
  2. After completing a Create Template Send.
  3. After completing a Document Send.

image.png

The issue is typically encountered during the redirect process back to the Salesforce after the operation is completed.

Steps to Solve:

To resolve the issue, disable Clickjack Protection for customer Visualforce pages with headers disabled in Salesforce Session Settings.

  1. Select the gear icon in the upper right-hand corner of the screen and select Setup.
  2. In the quick find on the left, enter Session Settings.
  3. Once session settings is selected, navigate to Enable clickjack protection for customer Visualforce pages with headers disabled and deselect the check box.
  4. Select Save and ensure the changes are applied successfully.
    image.png

Content will now be displayed correctly.

Workaround:

If clickjack protection must be enabled within an org and stay active, then you can add “*.force.com” as a trusted site.

  1. Setup -> Session Settings -> Trusted Domains for Inline Frames
  2. Click Add Domain
  3. Add the new trust site:
    Url = *.force.com, Context = Visualforce page
  4. Select Save and ensure the changes are applied successfully.
    image.png
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Access denied
Access denied