1

I have a formula field which returns hyperlink on the Case object. When some conditions are met, I insert a CaseComment with the formula field value in the body of the comment.

When I reference the formula field directly in case comment body it is showing like below:

 caseComment.body = 'This is '+case.formulafieldHyperlink+' code'.

Output:

This is <a href="urllink" target="_blank"></a> code

I know CommentBody is text, not rich text to show links. Is there any way to show a hyperlink in the body of a CaseComment?

  • You want to show an actual hyperlink inside a text field? Like clickable hyperlink? – Santanu Halder Feb 1 '17 at 13:25
  • Yes it should be clickable – mohammed azarudeen Feb 1 '17 at 13:31
  • I note that URLs in CaseComments are "adjusted" by SFDC to be wrapped in double quotes "xxx.foo.com" – cropredy Feb 1 '17 at 16:33
  • @cropredy FYI - when I reference the formula field which returns hyperlink in CommentBody, it is rendering the HTML format of anchor tag but not wrapping within quotes as you said – mohammed azarudeen Feb 2 '17 at 5:50
  • right, i was observing that while domain names in Case.Description are rendered by the browser as clickable, same domain name in CaseComment is surrounded by " and browser won;t render it as clickable – cropredy Feb 2 '17 at 20:39
-1

Hmm, I've never tried this exact use case, but you might try writing it out with an:

<apex:outputLink ...> link text </apex:outputLink> 
|improve this answer|||||
  • @kavin - FYI - Am trying to insert it from apex trigger. – mohammed azarudeen Feb 2 '17 at 5:43
  • am wondering how this could not be possible in case comment as it is a simple user need – mohammed azarudeen Feb 2 '17 at 5:44
  • Is there any idea exchange exist to vote for this functionality? – mohammed azarudeen Feb 2 '17 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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