• Neil1232
  • 0 Points
  • Member since 2012

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2

I'm writing an app (managed package) and I would like customers to be able to use outbound messaging tasks in workflow to kick off code within my apex managed package. I would create apex webservices, provide the end point URLs and the customer can then create nifty workflow rules which integrate with my app.


But it doesnt work.. Anyone got any ideas? Thanks!


My code


global class MyWebservice {
   webservice static void myFunction(Id idParam){
         System.debug('OUTBOUND MESSAGE RECEIVED!');

My workflow

Endpoint url: https://na9-api.salesforce.com/services/Soap/class/thdev/MyWebservice

Send session id: true


The error

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session 


My org has installed a managed package that contains a Home Page component that defines an HTML area. The HTML for the component defines an ifame that gets its source from a Visualforce page that's part of the package.


When I use Chrome to navigate to any page in my org that includes the sidebar (regardless of whether the sidebar is expanded), I get this error message:


Unsafe JavaScript attempt to access frame with URL https://pkgprefix.na5.visual.force.com/apex/VFPage from frame with URL https://na5.salesforce.com/home/home.jsp. Domains, protocols and ports must match.


The error is reported at  SfdcCore.js:150


This happens only in Chrome. (I have version 21.0.1180.89 m, currently the latest version of Chrome.) Firefox and IE are both fine.


When this happens, the Home Page component doesn't display (if the sidebar is expanded), and if I'm on a "view" page (like viewing an Account record), the related lists don't display -- they just sit there empty with the "loading" icon circling endlessly.


Clearly, the domains are different -- the Home Page Component's iframe's src's URL includes the managed package prefix, while the top-level window doesn't. So my question is NOT "What does this error mean?," but rather, "How can I stop it from happening or work around it?"


The Visualforce page that the Home Page Component's iframe loads does contain JavaScript, but nothing that attempts to access the iframe's parent's window. The fact that the error is reported in SfdcCore.js and not in the VF page's custom JavaScript, leads me to think that the problem lies in SfdcCore.js and not in the page's custom JavaScript.


Any thoughts?








I have a custom visualforce page with some javascrpit in it and I am getting this error: Unsafe JavaScript attempt to access frame with URL


Can someone help me figure out why the values are being passed incorrectly.


<apex:page standardController="lead" showheader="false" sidebar="false" id="pgId"> 
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.js"/>
<apex:includeScript value="{!URLFOR($Resource.tablesorter, 'jquery.tablesorter.js')}"/>
<apex:stylesheet value="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/trontastic/jquery-ui.css"/>

  <p id="hello">Hello World</p>
  <a href="http://www.google.com" class="name">google</a>
  <a href="http://www.yahoo.com" class="name">yahoo</a>
  <div id = "searching" title= "Searching.............">

<script type="text/javascript">
var j$ = jQuery.noConflict();
  $j("#searching" ).dialog({ 'autoOpen': true });


 this throws:

 Unsafe JavaScript attempt to access frame with URL https://c.cs7.visual.force.com/servlet/servlet.Integration?lid=XXXXXXXXXXX&ic=1 from frame with URL https://cs7.salesforce.com/XXXXXXXXXX. Domains, protocols and ports must match.


  • August 02, 2011
  • Like
  • 0