Newer Version Available
CollaborationGroup
Represents a Chatter group. This object is available in API version 19.0 and later.
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), query(), retrieve(), search(), update(), upsert()
Special Access Rules
The visibility of information in groups depends on the type of group and the user’s permissions.
- Members: Any user with the “Create and Own New Chatter Groups” permission can create public, private, and unlisted groups, including in any communities they belong to.
- Owners and managers: Users can modify group details for any group they own or manage. Owners can also delete groups they own.
-
Nonmembers: These user permissions allow group access regardless of group membership.
- “View All Data”—Allows users to view all public and private groups across their organization and its communities. Users with this permission can’t view unlisted group information, unless they have the “Modify Unlisted Groups” permission as well.
- “Modify All Data”—Allows users to view, modify, and delete all public and private groups across their organization and its communities. Users with this permission can’t view or modify unlisted group information, unless they have the “Manage Unlisted Groups” permission as well.
- “Create and Customize Communities”—Allows users to view, modify, and delete all public and private groups in communities.
- “Manage Unlisted Groups”—Allows users to search for, access, and modify any unlisted group in an organization and its communities.
- “Data Export”—Allows users to export any data from Salesforce, including private and unlisted group data from an organization and its communities.
-
Apex and Visualforce: Apex code runs in system mode, which means that the permissions
of the current user aren’t taken into account.
- Visualforce pages that display groups might expose unlisted or private group data to users who aren’t members.
- Because system mode disregards the user’s permissions, all users who are accessing a Visualforce page that’s showing a group can act as an owner of that group.
- AppExchange apps that are written in Apex and that access all groups will expose unlisted groups to users who aren’t members.
- Explicitly filter out unlisted and private group information from SOQL queries in all Apex code.
- Use permission sets, profile-level permissions, and sharing checks in your code to further limit group access.
- Use Apex triggers on the CollaborationGroup object to monitor and manage the creation of groups. In Setup, go to to add triggers.
Fields
| Field | Details |
|---|---|
| AnnouncementId |
|
| CanHaveGuests |
|
| CollaborationType |
|
| Description |
|
| FullPhotoUrl |
|
| GroupEmail | |
| HasPrivateFieldsAccess |
|
| InformationBody | |
| InformationTitle | |
| IsArchived |
|
| IsAutoArchiveDisabled |
|
| LastFeedModifiedDate |
|
| LastReferencedDate |
|
| LastViewedDate |
|
| MemberCount |
|
| Name |
|
| NetworkId |
|
| OwnerId |
|
| SmallPhotoUrl |
|
Usage
Use this object to create, edit, or delete groups in an organization or in a community. Deleting a group permanently deletes all posts and comments to the group. It also deletes all files and links posted to the group and removes the files from other locations where they were shared.
As a Chatter group member, you can post to the group using the CollaborationGroupFeed object. As a Chatter group owner or manager, you can add or remove group members using the CollaborationGroupMember object, post announcements to the group using the Announcement object, and accept or decline requests to join private groups using the CollaborationGroupMemberRequest object. Additionally, the group owner, manager, or your Salesforce system administrator can invite people to join the group using the CollaborationInvitation object.
The Salesforce system administrator doesn’t need to be a member of the group in order to send invitations using the API.