This question runs in a pre-configured Salesforce environment - no personal connection required.

Query all Account records where Rating equals 'Cold'. Set the Description field to null for each account. Update all the accounts with DML and return the list of updated accounts.

Cold-rated accounts are typically deprioritized in sales pipelines. Clearing their descriptions can be part of a data cleanup process, removing outdated notes so the records remain organized and current.

Method Signature

public static List<Account> clearColdDescriptions()

Examples

Input: (no parameters - queries the org directly) Output: List of Account records that were updated (Rating = 'Cold', Description = null) Explanation: All Cold-rated accounts have their Description field cleared
Scenario: Before execution, some Cold accounts may have descriptions After execution: All Cold accounts have Description = null Explanation: The method updates all Cold-rated accounts and returns them
Apex Code Editor

Welcome to Lightning Challenge!

How It Works

  • • Write your solution in the code editor
  • • This challenge runs without connecting your own org
  • • Submit to check if your solution passes
  • • Use hints if you get stuck

Contest Alert

🏆 #CodeEveryDay September 2026 (Sep 16–30)Sponsored by FLXBL

Contest runs September 16 - 30. Complete challenges to climb the leaderboard!

Prizes 1 & 2: Salesforce certification exam voucher — won by random drawing, where every point is a ticket. see all prizes

Only the 15 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In