May 14, 2021

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();  
              
    }  
      
}


No comments:

Post a Comment