+ Start a Discussion

Trigger on FeedItem to access @ mentions?

I am writing a trigger (after insert) on FeedItem.  If there's an @ mentions in the body, I need to get the User Id.  Can someone tell me how to do this?


Thanks in advance!


When a feed has @mention, the message Segment input is set to mention and this has the userID of the user @mentioned - i believe you can use this to the users mentioned in a post/comment


Message Segment Input: Mention

Represents an inline mention of a user. You must provide a user ID. No spaces are added.

Name                            Type                                           Description                                             Available Version
id                                   String                                     ID of the user to be mentioned.                         23.0
type                               String                                            Value is Mention.                                           23.0