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
anurag singh 22anurag singh 22 

Hyperlink in Rich text field apex

Hi Guys,
I have a requirement were I have a rich text field on the case object and throught Apex I need to update this field with a hyper link but the issue is Label of the link should be like "Click here" and the URL should be in the background.any thoughts on the same?
Best Answer chosen by anurag singh 22
anurag singh 22anurag singh 22
@Gaurav I need to put in a dynamic hyperlink into a Rich text field on case through Apex.
I managed to do so by directly inserting the HTML caseRichtextField= '<a href="https://www.google.com">Click Here</a>' into the rich text field

All Answers

Gaurav KheterpalGaurav Kheterpal
Can you re-phrase the question and explain clearly what you want to do? It's very confusing at the moment.
anurag singh 22anurag singh 22
@Gaurav I need to put in a dynamic hyperlink into a Rich text field on case through Apex.
I managed to do so by directly inserting the HTML caseRichtextField= '<a href="https://www.google.com">Click Here</a>' into the rich text field
This was selected as the best answer