Salesforce Certified Platform Sharing and Visibility Architect free question 5 / 10 · Domain 2: Access to Records
The org-wide default for the User object is Private for internal users. The company wants employees who are members of a custom object named Project to see each other's user records. A developer proposes creating user sharing records with Apex. Which statement matches the user sharing description in the Security Implementation Guide (Winter ’23)?
- Apex managed sharing works for users too, and an Apex sharing reason can distinguish the shares for each project
- Apex managed sharing isn’t supported for user records, so use public groups and user sharing rules to open them
- Apex managed sharing works for users, but the running user needs the permission to modify data in the org
- User records cannot be manually shared either, so set the default for users back to Public Read Only
Show the answer and explanation
Answer: B
Why this is correct
The user sharing considerations, in the paragraph on manual sharing for user records, say "Apex managed sharing isn’t supported." The ways to open user records are the org-wide default for users, user sharing rules based on membership of a public group, role, or territory, manual sharing, and the "View All Users" permission. There is no programmatic way to create the share records.
Why the other options are wrong
"Apex managed sharing works for users too, and an Apex sharing reason can distinguish the shares for each project" … Apex managed sharing is not supported for user records. Apex sharing reasons also belong to Apex managed sharing for custom objects, so they are not available for users.
"Apex managed sharing works for users, but the running user needs the permission to modify data in the org" … The limitation is not about permissions. Apex managed sharing itself is not supported for user records, so no permission makes the proposal work.
"User records cannot be manually shared either, so set the default for users back to Public Read Only" … The guide says manual sharing can grant read or edit access on an individual user, but only if the access is greater than the default access for the target user, and it lists manual sharing as available in Salesforce Classic. Resetting the default is not the only option.
Fitting the requirement
A user sharing rule shares members of a source group with those of a target group, and you create the groups, roles, or territories first. Users also inherit the same access as users below them in the role hierarchy. For project-based visibility, groups that match the project teams are therefore the place to build on.