+ Start a Discussion

how to hide data from everyone except a user on the record

were about to launch an hr initative and they want to lock down access to all records except for the employee thats listed on the record. i initially thought that the Sharing Settings would allow for a rule where the User is the User stored in one of the fields, but that wasnt an option. So then i thought that i could make the object Private and just give Employees access via a VF Page (class without sharing) and control the visibility using code, but when the obkect is private, Users cannot view the data even if their profile has them having access. So how do i lock this down? I cant get them view all cause they can view the record natively. I was really hoping Private Sharing Settings and a VF Page without sharing and custom logic to check user ids against stored fields wouldve been best bet...
SonamSonam (Salesforce Developers) 
When you make OWD as private without any Roles setup in your ORG, it should automatically restrict the user's access to only his owned data.Do you have roles in your ORG?You should also create the "VF with sharing" so that OWD applies and user sees only records s/he owns.