Apex Reference Guide
No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
ConnectApi.FeedItemAttachment
This class isn’t available in version 32.0 and later. In version 32.0 and later, ConnectApi.FeedElementCapability is used.
Important
This class is abstract.
Subclasses:
- ConnectApi.ApprovalAttachment
- ConnectApi.BasicTemplateAttachment
- ConnectApi.CanvasTemplateAttachment
- Connectapi.EmailMessage
- ConnectApi.CaseComment
- ConnectApi.ContentAttachment
- ConnectApi.DashboardComponentAttachment
- ConnectApi.FeedPoll
- ConnectApi.LinkAttachment
- ConnectApi.RecordSnapshotAttachment
- ConnectApi.TrackedChangeAttachment
Message segments in a feed item are typed as ConnectApi.MessageSegment. Feed item capabilities are typed as ConnectApi.FeedItemCapability. Record fields are typed as ConnectApi.AbstractRecordField. These classes are all abstract and have several concrete subclasses. At runtime you can use instanceof to check the concrete types of these objects and then safely proceed with the corresponding downcast. When you downcast, you must have a default case that handles unknown subclasses.
The composition of a feed can change between releases. Write your code to handle instances of unknown subclasses.
Important