You need to sign in to do that
Don't have an account?
Luke@TWS
Using AJAX in sidebar on Visual Force page
I have a sidebar component which gets some data from a custom object. Works fine on normal pages but I get an "Invalid Session ID found in SessionHeader: Illegal Session" error from the component when it loads up on a visual force page.
Any ideas?
Any ideas?
werewolf
I believe there's a merge field you need to use in your Scontrol to get it to get the proper session on a Visualforce page (the problem is that the Visualforce page is in a separate domain and so does not detect your SID cookie which is from naX.salesforce.com). It's something to the effect of {!API.SessionId} (but that may not be it verbatim so look it up in the docs).
Luke@TWS
Thanks for the reply. {!$Api.Session_ID} looks like the merge field I
need but it seems sidebar components only take HTML and JavaScript. At the moment I have a little bit of HTML and I'm calling a JavaScript document but Salesforce won't resolve merge fields in any of these.
werewolf
Put your Scontrol or Visualforce page in an Iframe on that home page component -- don't try to use the merge fields directly in it.