• Apeksha Adoor
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
public class OlderAccountsUtility
{
    public static void updateOlderAccounts()
    {
        List<Account> lstacc = [SELECT ID,Description FROM Account ORDER BY CreatedDate ASC LIMIT 5];
        
        for(Account acc : lstacc)
        {
            acc.Description = 'Heritage Account';
        }
        
        try
        {
        update lstacc;
        }
        catch(exception e)
        {
        }
    }
}


when i execute this code it is giving an error:
"Challenge Not yet complete... here's what's wrong: 
The 'updateOlderAccounts' method did not update account records as expected "

PLease help me with this