+ Start a Discussion

Is it possible to update longTextBox without overwriting existing values?


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?


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