Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
ConnectApi.FeedItemInput
Subclass of ConnectApi.FeedElementInput as of version 31.0.
| Property | Type | Description | Required or Optional | Available Version |
|---|---|---|---|---|
| attachment | ConnectApi.FeedItemAttachmentInput | Specifies the attachment for the feed item. The feed item type is inferred based on the provided attachment. Important: As of API version 32.0, use the inherited capabilities property. | Optional | 28.0–31.0 |
| body | ConnectApi.MessageBodyInput | Message body. The body can contain up to 10,000
characters and 25 mentions. Because the character limit can change, clients should
make a describeSObjects() call on the
FeedItem or FeedComment object and look at the length of the
Body or CommentBody field to determine
the maximum number of allowed characters. If you specify originalFeedElementId to share a feed item, use the body property to add the first comment to the feed item. To edit this property in a feed item, use updateFeedElement(communityId, feedElementId, feedElement). Editing feed posts is supported in version 34.0 and later. |
Required unless the feed item has a link capability or a content capability. | 28.0 |
| isBookmarkedByCurrentUser | Boolean | Specifies if the new feed item should be bookmarked for the user (true) or not (false). Important: As of API version 32.0, use the capabilities.bookmarks.isBookmarkedByCurrentUser property. | Optional | 28.0–31.0 |
| originalFeedElementId | String | To share a feed element, specify its 18-character ID. Important: As of API version 39.0, use the capabilities.feedEntityShare.feedEntityId property. | Optional | 31.0–38.0 |
| originalFeedItemId | String | To share a feed item, specify its 18-character ID. Important: In API version 32.0–38.0, use the originalFeedElementId property. In API version 39.0 and later, use the capabilities.feedEntityShare.feedEntityId property. | Optional | 28.0–31.0 |
| visibility | ConnectApi.FeedItemVisibilityType Enum | Type of users who can see a feed item.
Default values:
|
Optional | 28.0 |