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
VT-VT- 

Cloning a FeedItem loses @Mentions and /RecordLinks

Hi,

When cloning a FeedItem :

FeedItem item = f.Clone(false,true);
insert item;

The Body property lose all @Mentions and /RecordLinks. It is converted as plain text.

I found this KB explaining how to post @Mentions in a FeedItem. I could look for @Mention and /RecordLinks in the body and "convert" them. But it would not work in situation where multiple records have the same name.

There was an old topic on this with no answers and a lot of things changed since. Has anyone found a solution ?

Regards,

VT.

VT-VT-
Aslo, the KB is working well but only for @Mentions. It's not working for /RecordLinks (I just tested it).
Raj VakatiRaj Vakati
Insted of using the standard clone you can create a custom clone and use it 
 
FeedItem item = f.Clone(false,true);
insert item;
use like this 
 
FeedItem item =[Select Id ......from FeedItem ] ; 

FeedItem  fInsNew = new FeedItem () ;
//map fields from Query 
insert fInsNew em;


 
VT-VT-

Hi,

I actually already tried this. I still retested it right now to be sure and the result is the same as when I clone it.

VT.

Raj VakatiRaj Vakati
sure .. it will be a same ... let me now out come