This question runs in a pre-configured Salesforce environment - no personal connection required.
Query all Accounts that have a non-null AnnualRevenue. Set the Rating field on each Account based on the following rules: set Rating to 'Hot' if AnnualRevenue is greater than or equal to 1,000,000; set Rating to 'Warm' if AnnualRevenue is greater than or equal to 100,000 and less than 1,000,000; set Rating to 'Cold' if AnnualRevenue is less than 100,000. After setting the Rating field on each Account, perform a bulk update using a single DML statement.
Examples:
Input: (no parameters - operates on org data)
Before: Account with AnnualRevenue = 2000000, Rating = null
After: Account.Rating = 'Hot'
Explanation: AnnualRevenue >= 1000000 maps to Hot
Before: Account with AnnualRevenue = 500000, Rating = null
After: Account.Rating = 'Warm'
Explanation: AnnualRevenue >= 100000 and < 1000000 maps to Warm
Before: Account with AnnualRevenue = 50000, Rating = null
After: Account.Rating = 'Cold'
Explanation: AnnualRevenue < 100000 maps to Cold
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
Contest runs November 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.