• Simon Molloy 8
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
We have a VF page that uses the 'best practice' method of referencing some JS and CSS files, via a static resource. One resides on server CS17, the other on CS86 (both Sandbox instances).
On both servers the code is something like this:
"includeScript value="{!URLFOR($Resource.fileName, 'path/to/file.js')}"/>"
This, according to the recent documentation around the Critical Update - "Serve Static Resources from the Visualforce Domain" is the correct way of doing this.
On server CS17, this works fine. The relevant VF Page(s) load with no issues, and CSS & JS Libraries are included.
On server CS86, this does NOT work. We receive 404 errors on these resources.
The URLs for the resources are resolved as such:https://URL_TO_COMMUNITY/resource/RESOURCE_ID/Folder/File.js Again, on CS17 these work and are rendered correctly. On CS86, no such luck.
I have tried speaking to Salesforce Support as this is NOT a development issue, the code is identical between the two instances, but as soon as they see the words 'Javascript' or 'CSS' in the ticket description the Case is close (natch).
So - does anyone have any idea what this could be?? I have tried deactivating the Critical Update on the CS86 instance, but it doesn't have any effect. Any and all suggestions appreciated and will be tried! Thank you.
Hi All,

I want to navigate to case detail page on the Service Console from a Visual Force page.But i am getting the below error when i try to click the link.

VM2623 iframeinterface.js:1Uncaught SecurityError: Blocked a frame with origin "https://na35.salesforce.com" from accessing a frame with origin "https://c.na35.visual.force.com". Protocols, domains, and ports must match.

I added following in the console whitelist domains

na35.salesforce.com,
c.na35.visual.force.com

Any help is appreciated on this.

VF Page : 

<apex:page standardController="Case" >

     <A HREF="#" onClick="testOpenPrimaryTab();return false">Click here to open a new primary tab</A> 

    <apex:includeScript value="/support/console/30.0/integration.js"/>
    <script type="text/javascript">
        function testOpenPrimaryTab() {
            //Open a new primary tab with the salesforce.com home page in it
            sforce.console.openPrimaryTab(null, '/'+'50041000000nYHR', false, 
                'salesforce', openSuccess, 'salesforceTab');
        }
        
        var openSuccess = function openSuccess(result) {
            //Report whether opening the new tab was successful
            if (result.success == true) {
                alert('Primary tab successfully opened');
            } else {
                alert('Primary tab cannot be opened');
            }
        };
        
  </script>

</apex:page>

Error Details : 

VM2623 iframeinterface.js:1Uncaught SecurityError: Blocked a frame with origin "https://na35.salesforce.com" from accessing a frame with origin "https://c.na35.visual.force.com". Protocols, domains, and ports must match.handleOnload @ VM2623 iframeinterface.js:1window.onload @ crossDomainProxy.html:4

crossDomainProxy.html:4​

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript" src="/support/console/xdomain/30.0/xdomain.js"></script>
<script type="text/javascript" src="/support/console/xdomain/30.0/iframeinterface.js"></script>
<script type="text/javascript">window.onload = function() {Sfdc.xdomain.IframeInterface.handleOnload();};</script>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head></html>
 iframeinterface.js
window.Sfdc=window.Sfdc||{};Sfdc.xdomain=Sfdc.xdomain||{};Sfdc.xdomain.IframeInterface=function(){return{handleOnload:function(){var a=window.location.href.split("#")[1]||"";if(a){var a=new Sfdc.xdomain.Query(a),b=a.targetFrame;("sfdc-console"===b?top:"undefined"!==typeof a.targetParentFrame?parent.frames[a.targetParentFrame].frames[b]:parent.frames[b]).Sfdc.xdomain.Listener.accept(a)}}}}();


Please suggest a solution to this .

Thanks,
Sudheer