Use the ConnectApi.Announcements class to get, update, and delete announcements. Use an announcement to highlight information. Users can discuss, like, and post comments on announcements in the group feed. Group members receive an email notification when you post an announcement, same as for other posts, depending on their selected group email notification frequency. Deleting the feed post deletes the announcement.
This image of Salesforce shows an announcement displayed in yellow. Creating an announcement
also creates a feed item with the announcement text, which you can
also see in the image.
The following are methods for Announcements. All methods are static.
31.0
Yes
public static void deleteAnnouncement(String communityId, String announcementId)
Type: Void
To get a list of announcements in a group (including announcement IDs), call getAnnouncements(communityId, groupId) or getAnnouncements(communityId, groupId, pageParam, pageSize).
To post an announcement to a group, call postAnnouncement(communityId, groupId, announcement).
31.0
Yes
public static ConnectApi.Announcement getAnnouncement(String communityId, String announcementId)
Type: ConnectApi.Announcement
To get a list of announcements in a group (including announcement IDs), call getAnnouncements(communityId, groupId) or getAnnouncements(communityId, groupId, pageParam, pageSize).
To post an announcement to a group, call postAnnouncement(communityId, groupId, announcement).
31.0
Yes
public static ConnectApi.Announcement updateAnnouncement(String communityId, String announcementId, Datetime expirationDate)
Type: ConnectApi.Announcement
To get a list of announcements in a group (including announcement IDs), call getAnnouncements(communityId, groupId) or getAnnouncements(communityId, groupId, pageParam, pageSize).
To post an announcement to a group, call postAnnouncement(communityId, groupId, announcement).