Category: VisualForce

  • Salesforce: SF:INVALID_SESSION_ID

    I was constantly getting exception when I tried to use the “/soap/ajax/15.0/connection.js” in the VF Page.
    JavaScript throws following exception:-

    Invalid SessionID

    {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', }, }, }

    The exception was resolved when I added following statement before using the “sforce.connection” object in the JavaScript.

    sforce.connection.sessionId = “{!$Api.Session_ID}

    🙂

  • Salesforce Flex: “Error #2032: Stream Error. URL: “

    I came across the Error #2032 exception when I was trying to embed the swf file uploaded to static resources of the Salesforce instance. I searched it on the developer.force.com as well as google it around but didn’t find any solution. but after that i realised that the swf file is unable to find the force toolkit required for the execution of the swf file.

    I solved this by right clicking on the project in eclipse then on going to the properties.  And configuring the Framework linkage to merge in code value. I don’t know this was the correct way to do that or not.