Newer Version Available

This content describes an older version of this product. View Latest

SurveyFeed

Represents a single item in the feed displayed on the detail page for the Survey object. This object is available in API version 42.0 and later.

Supported Calls

delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

Fields

Field Details
Body
Type
textarea
Properties
Nillable, Sort
Description
The content of the feed item. Required when Type is TextPost. Optional when Type is ContentPost or LinkPost. This field is the message that appears in the feed.
CommentCount
Type
int
Properties
Filter, Group, Sort
Description
The number of comments associated with this feed item.

In a feed that supports pre-moderation, CommentCount isn’t updated until a comment is published. For example, you comment on a post that already has one published comment, and your comment triggers moderation. Now the post has two comments, but the count shows only one. In a moderated feed, your comment isn’t counted until an admin or user with the CanApproveFeedPostAndComment or ModifyAllData permission approves it.

This behavior has implications for how you retrieve feed comments. In a moderated feed, rather than retrieving comments by looping through CommentCount, go through pagination until the end of comments is returned.

Tip

InsertedById
Type
reference
Properties
Group, Nillable, Sort
Description
ID of the user who added this object to the feed. For example, if an application migrates posts and comments from another application into a feed, the InsertedBy value is set to the ID of the logged-in user.
IsRichText
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the feed item Body contains rich text. Set IsRichText to true if you post a rich text feed item via SOAP API. Otherwise, the post is rendered as plain text.

Rich text supports the following HTML tags:

  • <p>

    Though the <br> tag isn’t supported, you can use <p>&nbsp;</p> to create lines.

    Tip

  • <b>
  • <code>
  • <i>
  • <u>
  • <s>
  • <ul>
  • <ol>
  • <li>
  • <img>

    The <img> tag is accessible only via the API and must reference files in Salesforce similar to this example: <img src="sfdc://069B0000000omjh"></img>

In API version 35.0 and later, the system replaces special characters in rich text with escaped HTML. In API version 34.0 and prior, all rich text appears as a plain-text representation.

Note

LikeCount
Type
int
Properties
Filter, Group, Sort
Description
The number of likes associated with this feed item.
LinkUrl
Type
url
Properties
Nillable, Sort
Description
The URL of a LinkPost.
NetworkScope
Type
picklist
Properties
Group, Nillable, Sort
Description
Specifies whether this feed item is available in the default community, a specific community, or all communities. This field is available if Communities is enabled for your org.
NetworkScope can have the following values:
  • NetworkId—The ID of the community in which the FeedItem is available. If left empty, the feed item is only available in the default community.
  • AllNetworks—The feed item is available in all communities.
Note the following exceptions for NetworkScope:
  • Only feed items with a Group or User parent can set a NetworkId or a null value for NetworkScope.
  • For feed items with a record parent, users can set NetworkScope only to AllNetworks.
  • You can’t filter a FeedItem on the NetworkScope field.
ParentId
Type
reference
Properties
Filter, Group, Sort
Description
ID of the object type to which the FeedItem object is related. For example, set this field to a UserId to post to someone’s profile feed, or an AccountId to post to a specific account.
RelatedRecordId
Type
reference
Properties
Group, Nillable, Sort
Description
ID of the ContentVersion object associated with the ContentPost.
Title
Type
string
Properties
Group, Nillable, Sort
Description
The title of the FeedItem. When the Type is LinkPost, the LinkUrl is the URL and this field is the link name.
Type
Type
picklist
Properties
Filter, Group, Nillable, Sort
Description
The type of feed item. Except for ContentPost, LinkPost, and TextPost, don’t create FeedItem types directly from the API.
Visibility
Type
picklist
Properties
Filter, Group, Nillable, Sort
Description
Specifies whether this feed item is available to all users or only internal users. This field is available if Communities is enabled for your org.
Visibility can have the following values:
  • AllUsers—The feed item is available to all users who have permission to see the feed item.
  • InternalUsers—The feed item is available only to internal users.
Visibility has the following exceptions.
  • For record posts, Visibility is set to InternalUsers for all internal users by default.
  • External users can set Visibility only to AllUsers.
  • Visibility can be updated on record posts.
  • The Update property is supported only for feed items posted on records.