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

Every Opportunity in the Negotiation/Review stage needs an executive note. Query all Opportunities whose StageName is Negotiation/Review, set the Description field to the exact text Under executive negotiation on each one, update them in a single DML statement, and return the number of Opportunities updated. Avoid issuing a DML statement when there are no matching records.

Examples:

Input: (no parameters, queries all Opportunities) Output: 6 Explanation: The value shown is illustrative. The method returns the count of Opportunities in the Negotiation/Review stage that were updated Input: (an org with no Negotiation/Review Opportunities) Output: 0 Explanation: No records match so nothing is updated and the count is 0
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 October 2026 (Oct 16–31)Sponsored by FLXBL

Contest runs October 16 - 31. 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 16 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