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

Given a list of Opportunity records, advance every opportunity in the Proposal/Price Quote stage to the Negotiation/Review stage. Update only the changed records in a single DML statement and return how many were advanced. Return 0 for null or empty input.

Example 1:

Input: opps = [list of 8 opportunities in Proposal/Price Quote stage] Output: 8 Explanation: All 8 opportunities have their StageName changed to Negotiation/Review and updated in a single DML call. The method returns 8.

Example 2:

Input: opps = null Output: 0 Explanation: Null input returns 0 immediately without performing any DML.

Example 3:

Input: opps = [] (empty list) Output: 0 Explanation: An empty list returns 0 without performing any DML.

Example 4:

Input: opps = [list of Closed Won opportunities] Output: 0 Explanation: None of the records are in the Proposal/Price Quote stage so none are advanced and 0 is returned.
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 1–15)Sponsored by FLXBL

Contest runs September 1 - 15. Complete challenges to climb the leaderboard!

1st & 2nd: Salesforce certification exam voucher 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