+ Start a Discussion

Bulkify ConnectApi.FeedItem use for @mention Chatter posts through Apex

I want to create Chatter items using @mentions.  To my knowledge this is only possible using the ConnectApi.ChatterFeeds.postFeedItem funciton and the ConnectApi.FeedItems.  However this function does not take a function so I cannot use it inside a trigger. 


Is there a way to bulkify this or is that not possible at the moment with feed items with chatter? Does anyone know of an alternative solution?



I do not have a solution, but stepped over this too. Did you find a solution to your problem?
Jordan SewellJordan Sewell
I'm attempting to figure this out as well...I know that ConnectApi.ChatterFeeds.postFeedItem acts as a dml statement so creating the feed items in a trigger can blow up on bulk inserts/updates. Does anyone have a solution?

We can use the simple FeedItem object but I don't think it supports the @mention functionality
I've ran into this problem a couple of times over the year and I don't think I've found a solution anywhere on the web.  Lemme know if you do!