Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)
We are trying to build one simple website using force.com sites.Here User logged into website and need to perform different actions by moving to different VF pages.

We are facing a Problem to maintain Session of particular user. We need help regarding how to maintain session for particular user.

Kindly give your help. Please provide any sample code.

Thanks.

1 Answer

0 votes
by (32.1k points)
edited by

Well, you can't.

Think about it! You can store usernames/passwords in your data objects and if they allow you to login and maintain a session for that user and use it to walk around apex pages and builtin forms why would you buy a salesforce license? You could operate a 1000 employees rig with just one administrative license and a site URL. For that reason salesforce does not allow you session control, it grants you one when you buy and expense a license.

For sites, you have to purchase either a Customer Portal license or a volume-based High Volume Customer Portal set and then use those to "promote" a contact into a login user with the above license. Then, when that user logs into the site it has its own session.

To learn in-depth about Salesforce, sign up for industry-based Salesforce Training!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...