function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arun BArun B 

Role based data display ..

Hello there,
I have a requirement to display data based on the role. For example, a user id belonging to Role X can see only data pertaining to Role X upon logging on to the org through the frontdoor.jsp;

How can I specify the user role while accessing the front door.jsp from an external website and also accomplish this requirements ? Any pointers around this will be highly appreciated.

Arun B
I thought you were having users enter their credentials to your website, you were logging in using them, getting a session ID, and then going to Salesforce via frontdoor using that session id.  If that's the case, then the user would be logged in using those credentials (because the session id is for an authorized user session) and would have whatever permissions those credentials grant.

E.g. Tom logs into your website with his username/password, you use them to get a session id, and redirect Tom to SAlesforce through frontdoor.  This would be the same as if Tom had logged directly into Salesforce.   Whatever role/profile permissions Tom has is unrelated to how the login was done.

Or, perhaps you're just asking about the standard functionality of salesforce roles and profiles? 

Or perhaps I didn't understand your question? 


Arun BArun B
Hi Steve,
I got your point. It would be great if you could let me know how could I filter out the data for a custom or standard object that is being displayed on the salesforce.

For e.g: If a customer X logs onto the sales force from an external website, how could I display only certain data on the objects (without using roles) using some custom programming. I hope you got my question this time.

Arun B
Well customer X needs to be a user in Salesforce to log in in the first place.  If customer X is a user then customer X has a profile and a role.  You can use his role to decide which objects he can see, and you can use his profile to decide what fields in those objects he can see.

Have a look in Help & Training at Field Level Security.
Arun BArun B
Thanks Werewolf; I got it now.