How to add new line in RichText Area field using Apex in Salesforce?

How to add new line in RichText Area field using Apex in Salesforce?

Sample Code:
trigger AccountTrigger on Account ( before update ) {  
 
    for ( Account acc : trigger.new ) {  
      
        acc.Rich_Text_Area__c = ‘Updated on <br/>’ + System.now();  
              
    }  
      
}

Leave a Reply