Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
9

There is no owner for FeedItem records. Several of the other answers here are mixing up some of the relevant fields: CreatedById is the user that authored this post. This is probably the closest analog for 'Owner'. This field is writable at insert time, e.g. for use in data loads that copy chatter feeds. InsertedById is the user that inserted this post ...


9

It can be done. There is field called UserPreferencesDisableFollowersEmail which actually store the Follow me option data for the user. so if you want to do this via trigger or class just put the below code snippet, it will work :- //Select List of user for which Follows Me option. you can put where logic for selective users List<User> lst_User = [...


5

For everyone confused on how to post a Thanks on Chatter WITH the Badge Attachment -- all you need to do is set the Type to RypplePost on the FeedItem and automatically the chatter post will display the badge information.


4

Sometimes fields declared as Reference do not really work as references. In such cases you need to use some ugly workarounds like this one: SELECT Id, FeedItemId, ParentId, RelatedRecordId FROM FeedComment WHERE FeedItemId IN ( Select id from FeedItem WHERE Parent.Type = :mySObjectType )


4

I would think they can only mention members of the community. I believe you can add members by profile in the community settings. You could add all your internal users to the community this way. If you think about it, this should be how it works. How else would your internal users be able to respond on chatter? How to manage community membership


4

It's in the News Feed resource. The great part about the Chatter API is that it is self-describing; if you go into the workbench, go to the REST Explorer, and start drilling down, you'll eventually find what you want. Specifically, What I Follow is found in: /services/data/v42.0/chatter/feeds/news/me/feed-elements By using the REST Explorer, you can see ...


3

To add more mentions, simply create more ConnectApi.MentionSegmentInput objects and add them to the messageBodyInput.messageSegments list before you call ConnectApi.ChatterFeeds.postFeedElement(). I agree with cricketlang's ConnectApiHelper suggestion too!


3

If you are exposing the feed to an external page (meaning it's public), the platform has support for generating atom feeds (similar to RSS). See: http://developer.force.com/cookbook/recipe/adding-a-feed-to-your-force-com-site


3

Update this particular line with this public class MLPost { public static void MLPostCreate(List<FeedItem> posts) { And update your trigger trigger MLPostTrigger on FeedItem (before insert) { List<FeedItem> posts = Trigger.new; MLPost.MLPostCreate(posts); // or you could also use // MLPost.MLPostCreate(trigger.new); } ...


3

Bartley the salesforce help for Feed based Layout Overview says Feed-based layouts are available on account, contact, lead, opportunity, and custom objects. So i believe its available only for the 4 standard objects and for custom objects. Any other standard object other than the 4 listed above might not have feed based layout. additional reference : ...


3

I noticed that the last tab you switched to is set as default. So everytime you change tabs the default keeps changing. This was tested on a custom object.


3

I cannot find any official documentation on this but, AFAIK, this is not possible. I did find an idea for this functionality though. Also found a blog post on feed based layouts where the poster suggests (in a comment at the bottom) that they also do not believe its possible to change details to the default. IDEA https://success.salesforce.com/ideaView?...


3

You can follow this example for posting a mention. However, the example pertains to older API versions. To use v37.0, you'll need to make a change to the last line. Instead of this: ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput, null); use this: ConnectApi.ChatterFeeds.postFeedElement(Network.getNetworkId(), feedItemInput);


3

To short answer this "There is no shortcut" If you are trying to restyle you will have to roll your own chatter(Using Connect in apex and custom HTML and CSS and JS) .This is not recommended approach since chatter comes with lot of features and replicating the same means involves lot of custom code and investment on code maintainence If you are looking ...


3

Added internal user profile as member of community and that allowed internal and external users to collaborate on a record feed.


3

As per these Summer 14 release: The getFeedItem and postFeedItem methods are still supported, but to future-proof your applications, use the getFeedElement and postFeedElement methods. For example, as of API version 31.0, the only feed element types are feed item and bundle, but that could change in future releases. So it's better to use postFeedElement()...


3

Here is example apex code of creating a simple stream subscribing to two entities (an account and opportunity). Since ConnectApi (aka Chatter in Apex) always runs as the context user then this stream belongs to the currently running user and they will see it when they navigate to Chatter tab in the UI (screen shot below). ConnectApi.StreamSubscriptionInput ...


3

You won't be able to insert a FeedItem with Type TrackedChange. The documentation states that you cannot create a FeedItem with all Type values, but only few. Below is an excerpt from the Type field's description: The type of FeedItem. Except for ContentPost, LinkPost, and TextPost, don’t create FeedItem types directly from the API. A FeedItem with ...


2

You can with the ConnectAPI...that lets you create multiple message segments and upload an attachment in one post. The code below creates a simple blob as an example, but you can use any content. I would also check out this git repo for easier segment creation String s = 'Test my Attachment'; Blob b = blob.valueof(s); //ConnectApi.BinaryInput(blob, ...


2

This isn't supported by Salesforce and they could change their code to break this, but I've been successful in refreshing the Chatter feed with Javascript. if (window.chatter) { var feed = chatter.getFeed(); var feedConfig = feed.getConfig(); feed.refresh({ feedType : feedConfig.feedType, isFullRefresh : true, params : ...


2

I work at Salesforce and was helping to investigate your case. I found a workaround that you can apply. You'll be receiving a reply from your support representative shortly if you haven't already, but here's the general solution in case anyone else runs into it. Instead of this line: delete [select Id from myObject__Feed Where ParentId = :myRecordId]; ...


2

If you look at the class definition for Feed Element in the ConnectAPI, you can see the details of the Parent Actor object referred to by a-leaner. Depending on the what the parent is (group vs user for instance) and what type the Feed Element is (FeedItem vs Generic) will affect what concrete type of class the Parent Actor is - e.g. a user vs a group. It's ...


2

As I understand, Chatter relies on the FeedItem object which was introduced in the Spring '11 (earlier, it was FeedPost). FeedItem houses data about a chatter post such as the title, body, and content. Every chatter post creates a new record in FeedItem. This object has two user related Ids: ParentId – relates to the user, group or record that a ...


2

Easy bounty for me :P : You cant do this as of today Upvote for this idea. https://success.salesforce.com/ideaView?id=08730000000jTFmAAM


2

Your insert is failing on insert for an event where a whoid and whatid are both not present. In your else if statement you are setting fitem.ParentId = t.WhoId which most likely does not exist. You need to change that to the assignedTo user. You were not getting any errors because of setting Database.insert(feedItems,false). If you turn it to true you will ...


2

Maybe you want to create one page define chatter feed and then using iframe to locate it. <apex:iframe src="apex/Chatter_Feed_VF?Id={!$CurrentPage.parameters.Id}" height="350px" scrolling="true"/>


2

Apparently, someone updated the Global Publishing layout to no longer include the Post and File actions. I re-added these actions by editing the Global Publishing layout at Setup -> Build -> Create -> Global Actions -> Publisher Layouts


2

Unfortunately the ConnectApi classes currently don't support posting as another user. See here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connectapi_differences.htm In order to do that you have be login as another user Sample code. ConnectApi.FeedItemInput feedItemInput = new ConnectApi.FeedItemInput(); ConnectApi....


2

Chatter Free users don't have access to records. In this example, the feed item is being posted to a Case and Chatter Free users don't have access to Cases. From the Chatter User Licenses documentation: The Chatter Free license is for users who don’t have Salesforce licenses but need access to Chatter. These users can access standard Chatter items ...


2

Go to Setup--> Chatter-->Feed Tracking -->Select Account --> Uncheck "Enable Feed Tracking"


Only top voted, non community-wiki answers of a minimum length are eligible