ForceChallenges
ProblemsDailyNotes
Sign in
Problem list
Sign in to submit

Require Email for Contact Managers

EasyApex Triggeron Contact 10 ptsCreated Oct 12, 2026

Before a Contact is inserted or updated, require an Email when Title contains the word Manager. Contacts with other titles do not need an Email for this rule. Show a helpful error message.

Constraints

Keep the trigger bulk-safe and put no SOQL or DML statements inside loops.

ContactBefore TriggerValidationaddError
CodeApex
Loading editor…
Manager contact email requirement

Seed data

Contact× 0 rows
fields generated from the schema

DML under test

insertContact

Expected