This question runs in a pre-configured Salesforce environment - no personal connection required.
Find every open Opportunity (IsClosed = false) with an Amount of at least 100000 and set its NextStep field to 'Schedule executive review'. Update the records in a single DML statement and return the number of Opportunities updated.
Examples:
Scenario: Four open Opportunities exist.
- Open Opp A: Amount 250000 -> NextStep set to 'Schedule executive review', counted
- Open Opp B: Amount 50000 -> skipped (Amount below threshold)
- Open Opp C: Amount 100000 -> NextStep set to 'Schedule executive review', counted
- Closed Opp D: Amount 500000 -> skipped (IsClosed = true)
Output: 2
Explanation: Two open Opportunities meet the Amount threshold and are updated.
Scenario: No open Opportunities have Amount >= 100000.
Output: 0
Explanation: No records are updated.
Scenario: All open Opportunities have Amount >= 100000.
Output: (number of open Opportunities)
Explanation: Every open Opportunity is updated.
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.