This question runs in a pre-configured Salesforce environment - no personal connection required.
Update the Rating on each Account in the supplied list of Ids based on the NumberOfEmployees field. Use Hot when employees is greater than 1000, Warm when employees is between 100 and 1000 inclusive, and Cold when employees is less than 100. Skip accounts whose NumberOfEmployees is null. Return the number of accounts that were updated. Return 0 for null or empty input.
Examples:
Input: accountIds = [001..., 001..., 001...]
Output: 3
Explanation: All three accounts have an employee count and receive a rating
Input: accountIds = []
Output: 0
Explanation: Empty input results in zero updates
Input: accountIds = null
Output: 0
Explanation: Null input results in zero updates
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.