We’re rewarding the question askers & reputations are being recalculated! Read more.
16

I believe what you are looking for is Super User access: Super User Access Users can be assigned super user access to give them access to data owned by other users belonging to the same role or those below in the hierarchy. For example, a Partner Manager with super user access can see data owned by other users in the Partner Manager role and ...


13

Imagine you have two users. Both are in the same profile, which allows them to Create, Edit object XYZ. But these two users are in different parts of the role hierarchy. If User A Creates an XYZ, can user B edit it? The answer is only if the record is shared with him. If the Org Wide Default is Private then he will not even be able to see the record that ...


11

I would get the UserRole records you want first and then query the User records. Grouping UserRole Records by Parent // public with sharing class RoleHierarchy static Map<Id, List<UserRole>> hierarchy { get { if (hierarchy == null) { hierarchy = new Map<Id, List<UserRole>>(); for (...


10

The primary difference between the two is the question of "how many"? In the role hierarchy, you are allowed one role as a user. So if I am in a sales hierarchy where it is only regional (East, Central, West, for instance), no problem. But what if I also have an industry vertical, and I need to be in both East, and the Manufacturing vertical? This is ...


8

High-volume customer portal users are unable to participate in the salesforce sharing model. This means: The setting in Setup | Security Controls | Sharing have no impact on them. The role hierarchy has no impact. Apex managed sharing rules, and manual sharing have no impact. What you get instead is the ability to restrict them to seeing record where ...


6

Merging two organisations is always a painful process, and you should be weary of couple of things and plan for them accordingly. Object metadata - is it exactly the same? Especially around the fields that have the same name but have different semantics in each org. Validation/Workflow rules - Does a workflow rule in one org conflict with another workflow ...


6

From the documentation: The role hierarchy enables users above another user in the hierarchy to have the same level of access to records owned by or shared with [emphasis added] users below. Consequently, users above a record owner in the role hierarchy are also implicitly granted Full Access to the record... Understanding Sharing


6

I would hazard a guess that you have sharing rules on the account that are causing the contacts to be shared. However, you can definitely determine why by going to a "deleted" contact, and clicking on the Sharing button. From this page, click on the Expand List button, and choose the "Why?" Link next to a user that shouldn't have access. It will list all the ...


5

Since Role is mapped in user record so retrieve UserRoleId from User In the Group object , RelatedId field stores following types of values: Role RoleAndSubordinates Though Group can have other Type as follows which doesn't have RelatedId Organization Queue Regular So, final query will be like this SELECT Id,Name,DeveloperName,RelatedId,Type FROM Group ...


4

The profile has View All and Modify All for the object (Account) which is why it can see and change all of them.


4

What you expect to see depends upon what you have set for the OWD. Organization Wide Defaults apply to your entire org by default. When defined as: Public Read ONLY - Anybody(All users having access to that particular object) in your org. can read the records of the object. Public Read Write - Anybody(All users having access to that particular object) in ...


4

Its not related to Admin User Role .Its the Account for which contact(User in portal concept) are created the Role is Mandatory.The Account owner may not be always your user record .


4

Try using the manual share for the specific opportunity as explained at http://help.salesforce.com/apex/HTViewHelpDoc?id=granting_access_to_records.htm rather than giving him access to opportunities as a whole.


4

You should be able to calculate a given user's "true" access level by running this query: SELECT RecordId, HasEditAccess FROM UserRecordAccess WHERE UserId = <some user id> AND RecordId = <some record id> This only allows you to check a single user at a time, so it may not always be appropriate, but determining access for the current user ...


4

After much research time and some headaches... I've found a solution: You can obtain the Organization Wide Default Settings of a Custom Object by using the Metadata API (http://www.salesforce.com/us/developer/docs/api_meta/). It is a Soap Web Service which is provided by Salesforce and you can use it to get many of the configurations that you have set up for ...


4

It would seem that Custom Report Types drilled down to the Users Role DO NOT respect the sharing rules ADDING records that the role would not normally see with the Hierarchy alone... Idea: https://success.salesforce.com/ideaView?id=08730000000kzURAAY Knowledge Article: https://help.salesforce.com/HTViewSolution?id=000004564 It seems counter intuitive but ...


3

Not all reports filter on the role hierarchy. Those that do support filtering by hierarchy will automatically provide this option when saving the report using Save or Save As. Those that do not cannot be customized to do so.


3

The first thing to understand is that customer portal users don't have access to the sharing model and role hierarchy so your bottom two suggestions won't work. Customer portal users are only allowed access to objects that they own or objects that are associated via lookup to the portal user's account or contact record. This is done via Sharing Sets. ...


3

Have you tried Owner:User.UserRole.Name ?


3

As already identified in Thomas Taylors comment it would not be possible to automatically populate manager on a user using the role hierarchy for the following reasons: Manager field on User object only holds one Lookup to another user so if the next level above in the hierarchy has multiple User accounts assigned which one should be selected. The actual ...


3

There are no such fields on the UserRole object at the moment. But there is an Idea for that: https://success.salesforce.com/ideaView?id=08730000000ICep You can vote for it. Here is some info about system fields: http://www.salesforce.com/us/developer/docs/api/Content/system_fields.htm


3

No they will not. How are you using the id's in Apex? If so, you'll want to reference the roles by DeveloperName, which will remain consistent across deployments.


3

Salesforce does not allow this change of License Type (from a Partner Portal License (e.g. Gold Partner) to Full CRM), at all, not via the API, not via the UI, not via anything. Peter is correct about the method of changing a user's License type - it is done indirectly through switching to a Profile associated with a given License type. However, this ...


3

The trick to changing the license of a User record is that actually you will be updating the Profile of the user. You may have discovered already that "License" is not actually a field in the user object, even thought it appears in the User record UI. You would also need to update the Role, as partner users are assigned roles that sit outside of the normal ...


3

I would have recommended creating a role as you already thought about it. Put it directly under the CEO, as a sibling to all other trees for active users. You could then create a sharing rule dependent on that role, if necessary.


3

Sharing only goes to the record level, so there isn't a way to hide fields based on ownership. You could do something with visualforce pages to hide the data, but the data could still be accessible through reports or the API. Another approach would be to split out the sensitive data into its own object and make the sharing rules tighter for the sensitive ...


3

I've done a bit of research on this myself. There's another object called GroupMember which acts as a junction object between the User and the Group itself which contains the following fields: GroupId Id SystemModstamp UserOrGroupId Running a query like the following: SELECT GroupId,Id,SystemModstamp,UserOrGroupId FROM GroupMember WHERE GroupId = '...


3

Group grpObj = new Group(Type='Queue', Name='Test Queue1'); insert grpObj; QueueSObject qObj = new QueueSObject(SobjectType='Lead', QueueId=grpObj.Id); insert qObj; ID gr = [SELECT Id FROM Group WHERE Name = 'Test Queue1'].Id; ID us = [SELECT Id FROM User WHERE Name = 'Agent Comms' LIMIT 1].Id; GroupMember gm = new GroupMember(GroupId = gr, UserOrGroupId = ...


3

Actually Profile control object level access and role control record level access. If you set Opportunity OWD as private they both will be able to see only their record either Role same and profile diff or role same and profile same. Role define hierarchy level. If any user have higher level in hierarchy he can see lower level user record but in your ...


3

Please find this useful link for more information. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_understanding.htm Please find comments to your queries below: 1) When I checked via User_B he also able to see same record as of User_C. Is this because the reason that User_B is above role Hierarchy of User_C? ANS:...


Only top voted, non community-wiki answers of a minimum length are eligible