function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SevateSevate 

Need Help - SF:INVALID_SESSION_ID:INVALID SESSION ID FOUND IN SESSIONHEADER:ILLEGAL SESSION

Hi I keep getting this faultcode when I execute a onload function on a Visualforce page. SF:INVALID_SESSION_ID:INVALID SESSION ID FOUND IN SESSIONHEADER:ILLEGAL SESSION I have unchecked all settings on the setup-> administration setup-> session settings. I am trying to run a sforce.apex.execute that passes parameters to an external web service. Request help to resolve this issue
Ron HessRon Hess

visualforce uses onload(), so if you are using onload() then there is a conflict there.

 

sforce.apex.execute is not designed to call an external service, it calls an apex web service on Salesforce.com

 

So, i'm wondering did you hack the endpoint to talk to a different service? or is the other service actually a salesforce service? 

 

 

SevateSevate

Hi Ron

Thanks for taking the time. The other service we are calling is an external web service.

The requirement is to pass parameters to an external web service when a tab is clicked and when the page loads.

will look to change the onload event to execute. Can you please suggest any events

Regards

sforce2009sforce2009

Hi,

    You can use Page's action attribute.
 

Ron HessRon Hess

this function

 

sforce.apex.execute

 

is only going to talk to the salesforce API,

it's not going to work unless you re-write it from scratch to talk to your webservice.

 

the invalid session error only occurs when you talk to the salesforce API ,

so that is not going to be a problem since you are talking to a different API.