You need to sign in to do that
Don't have an account?

sforce.connection.sessionId = "{!$Api.Session_ID}"; does not work!
Hi
I am working on a old code. The line sforce.connection.sessionId = "{!$Api.Session_ID}"; does not work anymore and prevents any other code line to get executed!!
Any Suggestions/ Alternatives?
Thanks
Pallavi
Is this line in JavaScript?
Have you added "<script src="/soap/ajax/20.0/connection.js" type="text/javascript"></script>" connection file?
Praful,
I am also getting same error and I do have the follwing line in my onclick javascript button code.
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
Any idea what is the problem?
mk2013
@mk2013,
This should be the exact sequence.
{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/24.0/apex.js")}
sforce.connection.sessionId = '{!$Api.Session_ID}';