Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I have a trigger (Before Insert) on FeedItem that needs to modify a post by substituting certain words with replacement values, by updating FeedItem.Body. This works fine, except that @mentions are lost - the post looks like plain text; links to mentioned users are lost.

I found this similar question but the proposed solution was to use ConnectApi to post. The problem is, I'm not creating a new post directly, but changing a post in a trigger. Is it possible to preserve formatting while modifying the FeedItem SObject?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Unfortunately, when you modify FeedItem.Body in a trigger, there's currently no way to preserve the @-mentions in the body. This is a known limitation, which will be added to the documentation shortly.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.