You need to sign in to do that
Don't have an account?
Jorg_Janke
{!API.Session_ID} from URL not working from Lightning
We have a Url Button to access and process a record in Salesforce.
The user clicks a page link/button and the url which contains &sfSid={!API.Session_ID}&sfEndpoint={!API.Partner_Server_URL_360}
We use the endpoint/sid to log into Salesforce via SOAP and then access/process the record (cannot be done via APEX :-()
This works absolutely fine in Classic.
In Lightning, it works, if the Button is Detail Page Link with Display in new Window.
This creates an ugly full page screen with "You will be redirected to ... Click the button below to go to that page."
Looking for alternatives in Lightning, a Detail Page Button produces a nicer popup "Navigate to this page? .."
BUT when trying to login via SOAP with the endpoint/session provided via SOAP, we get the error:
[UnexpectedErrorFault [ApiFault exceptionCode='INVALID_SESSION_ID'
exceptionMessage='Invalid Session ID found in SessionHeader: Illegal Session'
]
The endpoint/sid "look ok".
Sometime ago, I read that there are different types of sid's ??
Obviously even in Lightning some values created by {!API.Session_ID} work and other's don't.
What are the different types or SID's and how do I manage/distinguish them?
How can I make it work in all cases??
Thanks!
Jorg
The user clicks a page link/button and the url which contains &sfSid={!API.Session_ID}&sfEndpoint={!API.Partner_Server_URL_360}
We use the endpoint/sid to log into Salesforce via SOAP and then access/process the record (cannot be done via APEX :-()
This works absolutely fine in Classic.
In Lightning, it works, if the Button is Detail Page Link with Display in new Window.
This creates an ugly full page screen with "You will be redirected to ... Click the button below to go to that page."
Looking for alternatives in Lightning, a Detail Page Button produces a nicer popup "Navigate to this page? .."
BUT when trying to login via SOAP with the endpoint/session provided via SOAP, we get the error:
[UnexpectedErrorFault [ApiFault exceptionCode='INVALID_SESSION_ID'
exceptionMessage='Invalid Session ID found in SessionHeader: Illegal Session'
]
The endpoint/sid "look ok".
Sometime ago, I read that there are different types of sid's ??
Obviously even in Lightning some values created by {!API.Session_ID} work and other's don't.
What are the different types or SID's and how do I manage/distinguish them?
How can I make it work in all cases??
Thanks!
Jorg
Thanks - Odd thing is that it works in some URL and not in others.
How would I solve this issue in a "lightning compatible" and maintainable way?
i.e. call a url and passing sid/etc. so that the user does not have to log in again?