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

Take a List of String account names and create new Account records with those names. Set Type to Prospect and Rating to Cold for all accounts. Insert all records in bulk and return the List of Account records with their new IDs. Return an empty list if the input is null or empty.

Examples:

Input: accountNames = ['Acme Corp', 'Global Industries', 'Tech Solutions'] Output: List of 3 Account records with IDs, Type='Prospect', Rating='Cold' Explanation: Creates 3 new Account records with the provided names and specified field values Input: accountNames = [] Output: [] Explanation: Returns empty list when input is empty Input: accountNames = null Output: [] Explanation: Returns empty list when input is null
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 July 2026

Contest runs July 1 - 31. Complete challenges to climb the leaderboard!

Only the 31 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