+ Start a Discussion
SS KarthickSS Karthick 

Record Sharing

Hi Everybody,

I am user and I have created a custom object (Test) which contains (name ,phone number and email fields)and the records inside the test object only visible to the my team leader and his manager..other user,leader and manager cannot view those record in test objects
Can anyone tell me how to do that??

Thanks in advance
Karthick
Best Answer chosen by SS Karthick
SvenSven
Hi,

In setup menu you first need to setup your Role Hierarchy.

Go to Setup - Manage Users - Roles

there you can build your role tree.

Like CEO --> Manager --> Team Leader1 --> local sales

And then on the user detail screen you can assign a role on the user. 

on security it is easy to understand if you keep in mind that Roles make records visible or not. Profiles arrange visibility on that record (fields,...)

All Answers

AshlekhAshlekh
Hi,

You can do this by OWD setting in your org.

Setup --> Administration Setup -->Security Controls -->Sharing Settings - Now you can see a section with "Organization-Wide Defaults" Title.

Click on Edit and then find your object make it Private. check the "Grant Access Using Hierarchies" check box clicked,

By this your object is now private it means the no body can see other record which have not created, they can see only that record which is they own owner.

And by check box you are giving acces to your role which is upper in your role.

Now you can see each recod will show you share button on reocrd.


Please mark as it soluiton if it helps you. ENJOY APEX
SvenSven
Hi,

In setup menu you first need to setup your Role Hierarchy.

Go to Setup - Manage Users - Roles

there you can build your role tree.

Like CEO --> Manager --> Team Leader1 --> local sales

And then on the user detail screen you can assign a role on the user. 

on security it is easy to understand if you keep in mind that Roles make records visible or not. Profiles arrange visibility on that record (fields,...)

This was selected as the best answer
Suneel#8Suneel#8
Hi,

Set OWD for Test object as Private.Disable 'Grant Access Using Hierarchies" option for Test object by unchecking it in Sharing settings.This gaurantees that record access is not opened up vertically through roles.Later create a sharing rule for object Test based on Rule Type "Based on record Owner" and select role of teammate in "Select which records to be shared" drop down and select role of team lead's manager(choose Roles and Subordinates in the first drop down) in "Select the users to share with'.You can select desired access level for "Select the level of access for the users".By this sharing rule you are opening up access for team lead and his manager to the records his reportees own.Ensure that 'View All" option is unchecked for all the profiles as it overrides sharing settings and allows access to all the records.Your role hierarchy should be like Teammate->Team Lead->Manager