MediumApex Triggeron Account 25 ptsCreated Oct 13, 2026
After Accounts are created, create one Contact for each Account. Use the Account name as the Contact last name and link the Contact to its Account. Create all Contacts in one DML operation.
Constraints
Use bulk-safe logic. Do not run SOQL or DML inside loops.
AccountContactAfter InsertBulkification
CodeApex
Loading editor…
Each account gets a contact
Seed data
Only the challenge's base org data.
DML under test
insertAccount
Expected
SELECT COUNT() FROM Contact WHERE LastName IN ('Northwind','Contoso')