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
KimKim 

Is it possible to update longTextBox without overwriting existing values?

Hello,

New at development and was wondering if anyone has come across the scenario where long textbox field contains existing values, and additional info needs to be appended to that existing long textbox without overwriting existing values? Is it possible to populate the old values + add the new values without having to create a new field to store the new values temporarily and update the long textbox field with the new values from the temp field?

Thanks!

Thanks!
Raj VakatiRaj Vakati
Yes .. You can do it. Let us Consider the long text area field description on Account for this example. Here is the sample code 
List<Account> accs = new List<Account>();

 for(Account a : [Select Id , Name , Description from Account]){
a.Description  =a.Description+'New Text Goes' here ; 
accs.add(a) ;
}

update accs

;