function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
steeeeveeeeeesteeeeveeeeee 

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?

 

Thanks

mlueckemluecke
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
steeeeveeeeeesteeeeveeeeee
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!