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
alliswellalliswell 

Invalid Session ID Error: Javascript and Salesforce

Hi All, Hoping to get some insights and guidance to solve the first part of the problem. The code below provides the user with a browser window, lets select a file, and on clickling Done should create a record with File Name and File Path. However, this is the error I am getting right now..Please help!((Originally this was a scontrol code working ONLY in IE..this is the second part of the problem)

 

{faultcode:'sf:INVALID_SESSION_ID',faultstring:'INVALID_SESSION_ID:Invalid Session ID found in
SessionHeader: Illegal Session', detail:{UnexpectedErrorFault:{exceptionCode:'INVALID_SESSION_ID',exceptionMessage:'Invalid Session ID found in SessionHeader:Illegal Session',},},}

 

 

Best Answer chosen by Admin (Salesforce Developers) 
alliswellalliswell

Added 

sforce.connection.sessionId = “{!$Api.Session_ID}” before instantiating an object via sforce.connection..

 

Solution found on http://eprasu.wordpress.com/2010/03/24/salesforce-sfinvalid_session_id/

All Answers

alliswellalliswell

Hi All,

 

Any insights? Please help!

alliswellalliswell

Added 

sforce.connection.sessionId = “{!$Api.Session_ID}” before instantiating an object via sforce.connection..

 

Solution found on http://eprasu.wordpress.com/2010/03/24/salesforce-sfinvalid_session_id/

This was selected as the best answer
AndrewFisher_TGPAndrewFisher_TGP
Know this is old but check profile permissions on any fields you have referenced as this will throw the same error.