Newer Version Available

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

Custom Object__Feed

Custom Object__Feed is the model for all record feed objects. The Custom Object__Feed object is not, in itself, accessible. Objects based on the Custom Object__Feed started to be available in API version 18.0 and later. Where available, we provide API availability for each custom object type in a list at the end of this topic and in the index.

A custom object feed shows posts and comments about the object and recent changes to the object’s tracked fields. The object name is variable and uses a Custom Object__Feed syntax, where Custom Object is the Object Name for the custom object. For example, OpportunityFeed represents a feed on the custom object Opportunity; AccountFeed represents a feed on the custom object Account.

Supported Calls

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

Special Access Rules

In the internal org, users can delete all feed items they created. This rule varies in communities where threaded discussions and delete-blocking are enabled. Community members can delete all feed items they created, provided the feed items don’t have content nested under them—like a comment, answer, or reply. Where the feed item has nested content, only feed moderators and users with the Modify All Data permission can delete threads.

To delete feed items they didn’t create, users must have one of these permissions:
  • “Modify All Data”
  • “Modify All” on the parent object, like an AccountFeed Account or an OpportunityFeed Opportunity.
  • “Moderate Chatter”

    Users with the “Moderate Chatter” permission can delete only the feed items and comments they can see.

    Note

    Only users with this permission can delete items in unlisted groups.

Fields

Field Details
BestCommentId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
The Id of the comment marked as best answer on a question post. This field is available in API version 44.0 and later.
Body
Type
textarea
Properties
Nillable, Sort
Description
The content of the custom feed object. 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 FeedComments associated with this feed item.

In a feed that supports pre-moderation, CommentCount isn’t updated until a comment is published. For example, say that you comment on a post that already has one published comment and your comment triggers moderation. Now there are two comments on the post, but the count says there's only one. In a moderated feed, your comment isn’t counted until it's approved by an admin or a person with “CanApproveFeedPostAndComment” or “ModifyAllData” permission.

Feed moderation has implications on how you retrieve feed comments. In a moderated feed, rather than retrieving comments by looping through CommentCount, go through pagination until end of comments is returned.

Tip

ConnectionId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
When a PartnerNetworkConnection modifies a record that is tracked, the CreatedBy field contains the ID of the system administrator. The ConnectionId contains the ID of the PartnerNetworkConnection. Available if Salesforce to Salesforce is enabled for your organization.
ContentData
Type
base64
Properties
Nillable
Description
Available in API version 36.0 and earlier only. Required if Type is ContentPost. Encoded file data in any format, and can’t be 0 bytes. Setting this field automatically sets Type to ContentPost.
ContentDescription
Type
textarea
Properties
Nillable, Sort
Description
Available in API version 36.0 and earlier only. The description of the file specified in ContentData.
ContentFileName
Type
string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. This field is required if Type is ContentPost.The name of the file uploaded to the feed. Setting ContentFileName automatically sets Type to ContentPost.
ContentSize
Type
int
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The size of the file (in bytes) uploaded to the feed. This field is read-only and is automatically determined during insert.
ContentType
Type
string
Properties
Group, Nillable, Sort
Description
Available in API version 36.0 and earlier only. The MIME type of the file uploaded to the feed. This field is read-only and is automatically determined during insert.
CreatedById
Type
reference
Properties
Defaulted on create, Filter, Group, Namepointing, Sort
Description
ID of the User who created this record. CreatedById is a standard system field.
CreatedDate
Type
dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when this record was created. CreatedDate is a standard system field.

Ordering by CreatedDateDESC sorts the feed by the most recent feed item.

FeedPostId
Type
reference
Properties
Filter, Group, Nillable, Sort
Description
This field was removed in API version 22.0, and is available in earlier versions for backward compatibility only.

ID of the associated FeedPost. A FeedPost represents the following types of changes in an FeedItem: changes to tracked fields, text posts, link posts, and content posts.

Id
Type
ID
Properties
Defaulted on create, Filter, Group, idLookup, Sort
Description
Globally unique string that identifies a record. Id is a standard system field.
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.
IsDeleted
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Standard system field. Indicates whether the record has been moved to the Recycle Bin (true) or not (false).
isRichText
Type
boolean
Properties
Defaulted on create, Filter, Group, Sort, Update
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

LastModifiedDate
Type
dateTime
Properties
Defaulted on create, Filter, Sort
Description
Date and time when a user last modified this record. LastModifiedDate is a standard system field.

When a feed item is created, LastModifiedDate is the same as CreatedDate. If a FeedComment is inserted on that feed item, then LastModifiedDate becomes the CreatedDate for that FeedComment. Deleting the FeedComment does not change the LastModifiedDate.

Ordering by LastModifiedDate DESC sorts the feed by both the most recent feed item or comment.

LikeCount
Type
int
Properties
Filter, Group, Sort
Description
The number of FeedLikes associated with this feed item.
LinkUrl
Type
url
Properties
Nillable, Sort
Description
The URL of a LinkPost.
NetworkScope
Type
picklist
Properties
Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available in the default community, a specific community, or all communities. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
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 account record that is tracked in the feed. The feed is displayed on the detail page for this record.
RelatedRecordId
Type
reference
Properties
Group, Nillable, Sort
Description
ID of the ContentVersion object associated with a ContentPost. This field is null for all posts except ContentPost.
Title
Type
string
Properties
Group, Nillable, Sort
Description
The title of the feed item. When the Type is LinkPost, the LinkUrl is the URL and this field is the link name.
Type
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of feed item:
  • ActivityEvent—indirectly generated event when a user or the API adds a Task associated with a feed-enabled parent record (excluding email tasks on cases). Also occurs when a user or the API adds or updates a Task or Event associated with a case record (excluding email and call logging).

    For a recurring Task with CaseFeed disabled, one event is generated for the series only. For a recurring Task with CaseFeed enabled, events are generated for the series and each occurrence.

  • AdvancedTextPost—created when a user posts a group announcement and, in Lightning Experience as of API version 39.0 and later, when a user shares a post.
  • AnnouncementPost—Not used.
  • ApprovalPost—generated when a user submits an approval.
  • BasicTemplateFeedItem—Not used.
  • CanvasPost—a post made by a canvas app posted on a feed.
  • CollaborationGroupCreated—generated when a user creates a public group.
  • CollaborationGroupUnarchived—Not used.
  • ContentPost—a post with an attached file.
  • CreatedRecordEvent—generated when a user creates a record from the publisher.
  • DashboardComponentAlert—generated when a dashboard metric or gauge exceeds a user-defined threshold.
  • DashboardComponentSnapshot—created when a user posts a dashboard snapshot on a feed.
  • LinkPost—a post with an attached URL.
  • PollPost—a poll posted on a feed.
  • ProfileSkillPost—generated when a skill is added to a user’s Chatter profile.
  • QuestionPost—generated when a user posts a question.
  • ReplyPost—generated when Chatter Answers posts a reply.
  • RypplePost—generated when a user creates a Thanks badge in Work.com.
  • TextPost—a direct text entry on a feed.
  • TrackedChange—a change or group of changes to a tracked field.
  • UserStatus—automatically generated when a user adds a post. Deprecated.
The following values appear in the Type picklist for all feed objects but apply only to CaseFeed:
  • CaseCommentPost—generated event when a user adds a case comment for a case object
  • EmailMessageEvent—generated event when an email related to a case object is sent or received
  • CallLogPost—generated event when a user logs a call for a case through the user interface. CTI calls also generate this event.
  • ChangeStatusPost—generated event when a user changes the status of a case
  • AttachArticleEvent—generated event when a user attaches an article to a case

If you set Type to ContentPost, also specify ContentData and ContentFileName.

Note

Visibility
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Specifies whether this feed item is available to all users or internal users only. This field is available in API version 26.0 and later, if Salesforce Communities is enabled for your organization.
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 to internal users only.
Note the following exceptions for Visibility:
  • For record posts, Visibility is set to InternalUsers for all internal users by default.
  • External users can set Visibility only to AllUsers.
  • On user and group posts, only internal users can set Visibility to InternalUsers.

Usage

A feed for a custom object is automatically created when a user enables feed tracking for the custom object. Use feeds to track changes to the custom objects they serve. For example, an AccountFeed tracks changes to an Account object. Use feed objects to retrieve the content of feed fields, such as type of feed or feed ID.

  • The name Article Type__Feed is variable, where Article Type is the name of the object’s article type. For example, Offer__Feed represents a feed item on an article that is based on the article type Offer.
  • NewsFeed and UserProfileFeed are available in API version 18.0 through API version 26.0. In API version 27.0 and later, NewsFeed and UserProfileFeed are no longer available in the SOAP API. Use the Chatter REST API to access NewsFeed and UserProfileFeed.

    Use the NewsFeed object to query and retrieve lead feed items associated with a converted lead record.

  • For NewsFeed and UserProfileFeed, users who do not have the “View All Data” permission have the following limitations when querying records: Must specify a LIMIT clause and the limit must be less than or equal to 1000. Can include a WHERE clause that references object fields, but can‘t include references to fields in related objects. For example, you can filter by CreatedDate or ParentId, but not by Parent.Name. Can include an ORDER BY clause that references object fields, but can’t include references to fields in related objects. For example, you can ORDER BY CreatedDate or ParentId, but not by Parent.Name. To query for the most recent feed items, ORDER BY CreatedDate DESC, Id DESC.

    Note the following SOQL restrictions. No SOQL limit if logged-in user has “View All Data” permission. If not, specify a LIMIT clause of 1,000 records or fewer. SOQL ORDER BY on fields using relationships is not available. Use ORDER BY on fields on the root object in the SOQL query.

  • Field Service Lightning must be enabled in your organization for ServiceAppointmentFeed, ServiceCrewFeed, ServiceMemberFeed, ServiceResourceCapacityFeed, ServiceResourceFeed, ServiceResourceSkillFeed, ServiceTerritoryFeed, ServiceTerritoryMemberFeed, and SkillRequirementFeed.
  • For WorkOrderFeed, Work Orders or Field Service Lightning must be enabled in your organization.
  • On UserFeed, if you use the FeedComment object to comment on a user record, the user can delete the comment. For example, if John Smith adds a comment to the feed on Sasha Jones’ user record, Sasha can delete the comment.

Custom Object Feed Type API Availability

  • AccountFeed (API 18.0)
  • AccountRelationshipFeed
  • ActiveScratchOrgFeed
  • Article Type__Feed (API 20.0)
  • AssetFeed
  • AssetRelationshipFeed
  • AssignedResourceFeed
  • CampaignFeed (API 18.0)
  • CareDiagnosisFeed
  • CarePreauthFeed
  • CarePreauthItemFeed
  • CareRequestDrugFeed
  • CareRequestFeed
  • CareRequestItemFeed
  • CaseFeed (API 18.0)
  • CertificationDefFeed
  • ChallengeParticipantFeed
  • Challenge__Feed
  • ChannelProgramFeed (API 41.0)
  • ChannelProgramLevelFeed (API 41.0)
  • CollaborationGroupFeed (API 19.0)
  • ConsumptionScheduleFeed
  • ContactFeed (API 18.0)
  • ContentDocumentFeed (API 20.0)
  • ContractFeed (API 18.0)
  • CoverageBenefitFeed
  • CoverageBenefitItemFeed
  • custom object__Feed (API 18.0)
  • DashboardComponentFeed (API 21.0)
  • DashboardFeed (API 20.0)
  • DirectMessageFeed
  • EngagementProgramFeed
  • EntitlementFeed (API 23.0)
  • EntityMilestoneFeed
  • EventFeed (API 20.0)
  • GoalFeed
  • LandingPageFeed
  • LeadFeed (API 18.0)
  • LinkedArticleFeed (API 37.0)
  • LocationFeed
  • MaintenanceAssetFeed
  • MaintenancePlanFeed
  • MarketingFormFeed
  • MarketingLinkFeed
  • MemberPlanFeed
  • MetricFeed
  • NamespaceRegistryFeed
  • NewsFeed (API 18.0–26.0)
  • OperatingHoursFeed (API 38.0)
  • OpportunityFeed (API 18.0)
  • OrderDeliveryGroupFeed
  • OrderDeliveryGroupLineFeed
  • OrderFeed (API 29.0)
  • OrderItemFeed (API 29.0)
  • OrderPriceAdjustmentLineFeed
  • OrgSnapshotFeed
  • PartnerFundAllocationFeed (API 41.0)
  • PartnerFundClaimFeed (API 41.0)
  • PartnerFundRequestFeed (API 41.0)
  • PartnerMarketingBudgetFeed (API 41.0)
  • PlanBenefitFeed
  • PlanBenefitItemFeed
  • Product2Feed (API 18.0)
  • ProductConsumedFeed
  • ProductItemFeed
  • ProductItemTransactionFeed
  • ProductRequestFeed
  • ProductRequestLineItemFeed
  • ProductRequiredFeed
  • ProductTransferFeed
  • ProfileSkillEndorsementFeed (API 34.0)
  • ProfileSkillFeed (API 34.0)
  • ProfileSkillUserFeed (API 34.0)
  • PurchaserPlanAssnFeed
  • PurchaserPlanFeed
  • QuoteFeed (API 39.0)
  • ReportFeed (API 20.0)
  • ResourceAbsenceFeed (API 38.0)
  • ResourcePreferenceFeed
  • ReturnOrderFeed (API 42.0)
  • ReturnOrderLineItemFeed (API 42.0)
  • ScratchOrgInfoFeed
  • ServiceAppointmentFeed (API 38.0)
  • ServiceContractFeed (API 23.0)
  • ServiceCrewFeed
  • ServiceCrewMemberFeed
  • ServiceResourceCapacityFeed (API 38.0)
  • ServiceResourceFeed (API 38.0)
  • ServiceResourceSkillFeed (API 38.0)
  • ServiceTerritoryFeed (API 38.0)
  • ServiceTerritoryLocationFeed
  • ServiceTerritoryMemberFeed (API 38.0)
  • ServiceTerritoryWorkTypeFeed
  • ShipmentFeed
  • SignupRequestFeed
  • SiteFeed SkillRequirementFeed (API 38.0)
  • SocialPostFeed (API 26.0)
  • SolutionFeed (API 18.0)
  • SOSSessionFeed
  • SurveyFeed (API 42.0)
  • TaskFeed (API 20.0)
  • Territory2ModelFeed
  • TimeSheetEntryFeed
  • TimeSheetFeed
  • TopicFeed (API 29.0)
  • UserFeed (API 18.0)
  • UserProfileFeed (API 18.0–26.0)
  • WorkBadgeDefinitionFeed
  • WorkCoachingFeed
  • WorkFeedbackRequestFeed
  • WorkGoalFeed (API 35.0)
  • WorkOrderFeed (API 36.0)
  • WorkOrderLineItemFeed (API 36.0)
  • WorkPerformanceCycleFeed
  • WorkRewardFundFeed
  • WorkRewardFundTypeFeed
  • WorkTypeFeed (API 38.0)
  • WorkUpgradeActionFeed
  • WorkUpgradeCustomerFeed