2

What i want to do is simply allow some users (non salesforce users) to view some specific records , so i have created for each user an email and a password for authentification purposes and once logged in ( the user enters the email and the pass in a authentification form that i can verify in the database) i need to keep track of this user as he navigates from one page to another in order to display only the records related to him

the problem is that ,as far as I know, there is no sessions in salesforce as it is in php for example.So i want to know if there is a way to do that in order to simulate sessions functionality to keep track of these users.

any help will be highly appreciated.

  • 2
    "the user enters the email and the pass in a authentification form that i can verify in the database" You need to be very careful here, this approach likely violates the Salesforce TOS as they would likely take the view that you should be using regular users / community users for this functionality. – Davin Casey Feb 16 '16 at 10:22
  • There's plenty of authentication and identity management features in salesforce that will do this for you. You'll need to have your users, as users in salesforce with some type of license though. – Samuel De Rycke Feb 16 '16 at 11:00
  • So, we can not in salesforce create public websites for non salesforce users at all unless they have salesforce license am i right ? (I am very new to salesforce ) i am thinking about a shopping website when you have to use sessions for this purpose ( it is not possible to get everybody to have a license inorder to use the website). – Merabti iBRAHIM Feb 16 '16 at 11:15
2

No, there is no session information or security for non-Salesforce User users. You should take a look into Community Cloud to meet your requirements.

If you continue down your current path then you are likely to be in violation of the Master Subscription Agreement which you agreed to when purchasing your Salesforce licenses.

  • i do not know i am violating salesforce TOS. Can Community Cloud allow me to do that without buying a license for the external users in this context , or there is no other way out ? – Merabti iBRAHIM Feb 16 '16 at 11:20
  • If you need external users to authenticate and you want to stay within the TOS there is no other way out. Try talking to your Salesforce AE about options. – Alex Tennant Feb 16 '16 at 16:15
1
  • Salesforce already does session handling (and all other low level stuffs which you would do in other web frameworks) internally and you don't need to worry about handling it internally in your code.

  • Along with this Salesforce has User Management and Security features out of the box which you can use from Setup -> Manage Users -> Users and create a new user

  • Then choose the user or profile to decide on what level of access you want to provide

If you really want to implement access restrictions I would highly recommend reading this overview page first: https://developer.salesforce.com/page/An_Overview_of_Force.com_Security

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.