Find your content:

Search form

You are here

Where can I find the official APEX language and system class reference?

 
Share

Specifically, I want to look up what parameters the constructor of the Cookie class takes.

The most official looking thing I could find was in the salesforce developers docs, but the constructor is not documented there.

Is there one canonical place to go for this sort of information?

Also, I don't have enough rep to create a more suitable tag for this question. Something like "tools". Can someone please re-tag this more appropriately?


Attribution to: JannieT

Possible Suggestion/Solution #1

You should be able to find all the documentation you need here:

http://wiki.developerforce.com/page/Documentation

Specifically, Apex docs are here:

http://www.salesforce.com/us/developer/docs/apexcode/index.htm


Attribution to: Phil Hawthorn

Possible Suggestion/Solution #2

You are looking in the correct place, but its one of those areas that isn't well documented, presumably because it doesn't get used that much and nobody has reported the problem.

I have used cookies in the past, and struggled in the same way that you did. My understanding of the constructor is as follows:

Cookie cook=new Cookie('Name', 'Keir Bowden', null, 1440, false);

Where:

  • 'Name' = the name of the cookie
  • 'Keir Bowden' = the value of the cookie
  • null = the cookie path (where null results in the default location '/')
  • 1440 = the max age
  • false = is the cookie only accessible through https

This is only my opinion though! I also recall that the max age didn't seem to have any effect, and I could only generate session cookies, but in the end I couldn't do what I wanted to anyway so I didn't investigate further.


Attribution to: Bob Buzzard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4889

My Block Status

My Block Content