If you enabled all four Clickjack protection boxes in Setup > Session Settings, you may get a connection error for GridBuddy Connect workspaces and GridBuddy Connect embedded grids built from the GridBuddy Connect lightning component.
The error message reads "<org name>--gbcloud.visualforce.com refused to connect." and appears wherever you used the GridBuddy Connect lightning component within Salesforce. For example:
To fix the connection error, you must add two URLs as trusted domains. If you do not add the URLs as trusted domains, then any GridBuddy Connect workspaces built from the GridBuddy Connect lightning component, and any GridBuddy Connect embedded grids built from the GridBuddy Connect lightning component will not load once Clickjack protection is enabled.
The two URLs you need to add as trusted domains are:
- The URL as it appears in your error message http://<org name>--gbcloud.visualforce.com
- The primary Salesforce org URL as displayed in your browser address bar
Add trusted domains
- Go to Setup > Session Settings
- Locate the Trusted Domains section
- Click Add Domain
- Enter your first domain and select Visualforce Pages as the iFrame Type
- Be sure to delete any characters such as a forward slash after .com or you will get an Invalid Data error
- Click Save & New and repeat step 4 for the second domain.
- Click Save
Your two domains are now considered trusted domains by Salesforce and the connection error will not recur.
Please note that the GridBuddy Connect Grids tab, the GridBuddy Connect Wizard, and GridBuddyConnectSettings are not affected by Clickjack protection. If you are only using these tabs, and are not using the GridBuddy Connect Lightning component to embed grids or create workspaces, then there is no GridBuddy Connect-related action required after enabling Clickjack protection.