Group

A set of User records.

Groups are sets of users. They can contain individual users, other groups, the users in a particular role or territory, or the users in a particular role or territory plus all the users below that role or territory in the hierarchy.

Supported Calls

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), search(), retrieve(), update(), upsert()

Special Access Rules

Customer Portal users can’t access this object.

Fields

Field Details
DefaultDivision
Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
This record’s default division. Only applicable if divisions are enabled for your organization.
DeveloperName
Type
string
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Corresponds to Group Name in the user interface.

This field is available in API version 24.0 and later.

Note

Note

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.

DoesIncludeBosses
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the managers have access (true) or do not have access (false) to records shared with members of the group. This field is only available for public groups. This field is available in API version 18.0 and later.
DoesSendEmailToMembers
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether the email is sent (true) or not sent (false) to the group members. The email is sent to queue members as well.
Email
Type
email
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
Email address for a group of type Case. Applies only for a case queue.
Name
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
Required. Name of the group. Corresponds to Label on the user interface.
OwnerId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the user who owns the group.
QueueRoutingConfig
Type
reference
Properties
Create, Delete, Query, Retrieve, Update
Description
The ID of the queue routing configuration associated with the queue.
RelatedId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
Represents the ID of the associated groups. For groups of type “Role,” the ID of the associated UserRole. The RelatedId field is polymorphic.
Type
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort
Description
Required. Type of the group. One of the following values:
  • Regular—Standard public group. When you create() a group, its type must be Regular, unless a partner portal is enabled for the organization, in which case the type can be Regular or PRMOrganization.
  • Role—Public group that includes all the User records in a particular UserRole.
  • RoleAndSubordinates—Public group that includes all the User records in a particular UserRole and all the User records in any subordinate UserRole.
  • Organization—Public group that includes all the User records in the organization. This group is read-only.
  • Case—Public group of users, members of a queue that can own a Case.
  • Lead—Public group of users, members of a queue that can own a Lead.
  • ManagerPublic group that includes a user’s direct and indirect managers. This group is read-only.
  • ManagerAndSubordinatesInternalPublic group that includes a user and the user’s direct and indirect reports. This group is read-only.
  • PRMOrganization—Public group that includes all the partners in an organization that has the partner portal feature enabled.
  • Queue—Public group that includes all the User records that are members of a queue.
  • Territory—Public group that includes all the User records in an organization that has the territory feature enabled.
  • TerritoryAndSubordinates—Public group that includes all the User records in a particular UserRole and all the User records in any subordinateUserRole in an organization that has the territory feature enabled.
  • ChannelProgramGroup—Public group for partners in a channel program.
  • CollaborationGroup—Chatter group.
Only Regular, Case, and Lead can be used when creating a group. The other values are reserved.

Usage

Unlike users, this object can be deleted. Any User can access this object—no special permissions are needed.

Only public groups are accessible via the API. Personal groups are not available.

In API version 34.0 and later, you can query a group using Related.Name to retrieve the group’s name. Related.Name is supported for public groups, user roles, territories, manager groups, and user names.

In API version 13.0 and later, if you delete a public group, it is deleted even if it has been used in sharing, consistent with the behavior for UserRole. In versions before 13.0, such sharing prevents the record from being deleted.

See Also