Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
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!
1 answer
  1. Feb 9, 2018, 5:06 PM

    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

    ;

     
0/9000