i had written a javascript in home page component.it'll load as soon as we login to the salsforce and its working fine. but if i open Visualforce page it throws "sf:invalid code...invalid session id." How to resolve this issue. following is the session code i used in javascript.

sforce.sessionId = getCookie('sid'); sforce.connection.sessionId=sforce.sessionId;

有帮助吗?

解决方案

If you want get session id, you can try to use next JS code:

var __sfdcSessionId = '{!GETSESSIONID()}';
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top