Sub topic 5
Public groups and queues as sharing targets
This chapter assumes you know what org-wide defaults and the role hierarchy do, and that you can navigate Setup. Sharing rules and manual shares need a target: the users who receive access. Public groups and queues are the two reusable containers for those targets.
Public groups
A public group is a named set of users that an administrator defines once and reuses in many places. Members can be:
- Individual users
- Roles
- Roles and subordinates
- Other public groups
- Portal or community roles, where applicable
You create one in Setup under Users > Public Groups. Use a group when the same audience appears in several sharing rules. When membership changes, you edit the group and every rule that references it follows.
The Grant Access Using Hierarchies checkbox on a group controls whether users above members in the role hierarchy also get access. It is selected by default. Clear it only for a group you want to keep strictly to its listed members.
Queues
A queue holds records that no individual user owns yet. Queues are available for leads, cases, and custom objects that have queues enabled, plus a few other objects such as orders and knowledge articles. Each queue has members, and you choose which objects it can hold. Any member can take a record from the queue.
A queue is a record owner, not just a target. When a record is owned by a queue, members of the queue can access it. Users above those members in the role hierarchy can also access it. A queue can also be the source in an owner-based sharing rule, so records it owns can be shared onward.
Where each one can be used
| Feature | Public group | Queue |
|---|---|---|
| Receive access in a sharing rule | Yes | No |
| Be the "owned by" source of a rule | Yes | Yes |
| Own records | No | Yes |
| Be chosen in manual sharing | Yes | No |
| Contain roles | Yes | No |
Queues cannot receive access through a sharing rule target, so the "share with" side of a rule is almost always a public group, a role, or a role with subordinates.
Common errors
- Duplicating members across rules. Several rules each list the same users. Create one group and reference it.
- Nesting groups too deeply. Groups can contain groups, but deep nesting makes it hard to see who is really included and slows group maintenance.
- Treating a queue as a share target. If you need to give a team access to records, put the team in a public group.
- Forgetting the hierarchy setting. A group with Grant Access Using Hierarchies cleared surprises managers who expected access.
- Adding a user but not waiting. Large membership changes trigger background recalculation, so access may lag briefly.
Exercise
A rule must share overdue invoices with the finance managers in two regional roles, and a second rule must share disputed invoices with the same people. How should you set up the targets, and why?
Show answer
Create one public group, for example Finance_Managers, that contains both regional roles. Point both rules at that group. When the audience changes, you edit one group instead of two rules, and both rules update.