Roles are created according to the corporate hierarchy of the system. Roles determine how the data is shared with the user. While profiles determine which objects can be seen by which users, roles determine which records from the object can be seen by the user. The user can be separated on the basis of their work department, territory, or company hierarchy.
The following diagram illustrates a basic sample role hierarchy:
In the preceding diagram, A, B, C, and D, are records of the same objects owned by Rep1, Rep2, Rep3, and Rep4, respectively. While all the four reps have access to the same objects, they do not have access to each other's records. Manager 1 can see the data and reports from Rep1 and Rep2 as they come under his hierarchy. He cannot, however, access the data for Rep3 and Rep4. The Super Manager can see the entire organization's data as he is topmost in the hierarchy.
Role hierarchy prevents the data from being seen by people at the same level in the hierarchy...