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

Simple Question - Session Variables?
Sorry if this question seems remedial, but I can't seem to find the answer anywhere...
I have a set of VisualForce pages that make calls to a 3rd party web service that I wrote. This web service requires a "key" that is retrieved by calling the "Login()" function on the web service. This function sends back a string that should be used with all subsequent calls to this web service. My question is, is there some equivalent of session variables I can use in Apex to store this variable? I would like some variable I can set that will live as long as the SF user is logged in, and should only be accessible by that SF user.
Thanks,
Spector
Message Edited by Spector on 10-03-2008 04:12 PM
I have a set of VisualForce pages that make calls to a 3rd party web service that I wrote. This web service requires a "key" that is retrieved by calling the "Login()" function on the web service. This function sends back a string that should be used with all subsequent calls to this web service. My question is, is there some equivalent of session variables I can use in Apex to store this variable? I would like some variable I can set that will live as long as the SF user is logged in, and should only be accessible by that SF user.
Thanks,
Spector
Message Edited by Spector on 10-03-2008 04:12 PM
Is it a value that should not be accessible to an admin user? How private is it?
There's a few options for storing data 'like' a session... although, there's no notion of session yet. Can you give a bit more detail?
Your best bet is probably to store the session key in a custom field on the user's profile.
David
You can then use it whenever you need in VF pages or apex code that is run by that user. (take a look at the UserInfo class, this will allow you to see in apex which user is in context).
-David