3

I am new to Salesforce, and need an advise.

We are planning to create a custom object and custom tab for it. Now, we want user to be able to access only his/her record, or records related to him. For example, student can only see his record, but professor can see all his/her records. Can I do it with sharing?

Thanks, V.

EDIT 1

I created two roles: enter image description here

I assigned roles to users:

enter image description here

The object has default access as Private and allows hierarchy:

enter image description here

I created two records, one with Student ownership, and one with Instructor ownership:

enter image description here

and

enter image description here

I would expect that student can only see his record and Instructor can see both records. However, in my case both user can see both records. I do not understand what is wrong in my setup. Thanks:

enter image description here

and

enter image description here

1 Answer 1

1

This is very fundamental.Keep the org wide default (OWD) as private for the object.Have a role hirerachy and keep professor at top of role hirerachy than student.

Also make sure you have checked grant access using hirerachy as true.

OWD you can find under sharing settings and also you can find roles under administrative settings.

6
  • Thanks a lot. What if professors and students do not create their records. Owner field will not have their names. I assume hierarchy sharing rules work with Owner field. How I can reach the same result using student and professor IDs ?
    – vlr
    Jul 3, 2013 at 20:30
  • owner ids you can always load through data loader i feel for records. Jul 3, 2013 at 20:39
  • its not possible with just Ids Jul 3, 2013 at 20:39
  • Mohith, what if I have multiple professors and multiple students, and professors suppose to see only their students, can I only use two roles "Professor" and "Student"? If yes, how do I limit professor to see only his student in the role hierarchy?
    – vlr
    Jul 15, 2013 at 19:13
  • @vlr whats the profile of professors and students?make sure that profile of dont have view All access or modify all for the object ?If view All or modify All exists then role hirerachy holds no importance .If multiple professors come in then you may need concept of territory management i feel. Jul 16, 2013 at 4:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .