I am trying to add a hyperlink to an Opportunity in the body of a note record. Something like this
note n = new note();
n.ParentId = {OpptyId};
n.title = 'Note from code';
n.body ='<a href=' +System.URL.getSalesforceBaseUrl().toExternalForm()+'/'+PrimaryId.get(op.Id)+' >'+'Closed Cleanup'+'</a> <br/>';
Insert n;
However, when note is created I see body-
<a href=https://ap8.salesforce.com/0060o00001BFCSZ>Closed Cleanup </a> <br/>
But I want body of note to have Closed Cleanup as clickable and should be redirecting on clicking to - https://ap8.salesforce.com/0060o00001BFCSZ
I took the reference from - How to use a Hyperlink function in apex class? which says Rich Text Area field can contain the hyperlink. If that's true , how do I add a hyperlink to a note record?