0

As I am using this code to add a feeditem in the case. As it created a feeditem on the case but hyperLink is not working. In the documentation we got that isRichText supports the tag but in my salesforce org it is not able to generate the hyperlink on the Manas. It means that the text "Manas" appears, but is not clickable

Below is the Code that I used to create the feeditem.

FeedItem fd = new FeedItem();
fd.parentid = '5001w00000835Qk'; //any parent Id 
fd.body = '<a href = "https://d1w0000008iszeai--developer.my.salesforce.com/5001w0000081sOsAAI">Manas</a>'
fd.title = 'test';
fd.isRichText = True;
insert fd;
2
  • Welcome to Salesforce Stack Exchange (SFSE). Please edit your question to give more information on what you mean by "hyperLink is not working" and "not able to generate the hyperlink". Do you mean that the text "Manas" appears, but is not clickable? Or do you mean that "Manas" appears and is clickable, but does not redirect you to the URL? Or do you mean that there is an error generated? Or...?
    – Moonpie
    Commented Sep 14, 2021 at 13:51
  • Hey there. This is a good question, but I believe it is best answered by another existing question, making this a duplicate. I've voted to close, but please keep coming back with questions. In my suggested duplicate, there are two good answers for you to consider including a Chatter link post, and using the chatter ConnectApi wrapper for the Chatter REST API. The ConnectApi uses quite a bit of boilerplate, but will give you the most flexibility regarding rich text posts.
    – pchittum
    Commented Sep 16, 2021 at 8:39

0

Browse other questions tagged .