# Require Case Contact for Escalations

**Type:** Apex trigger · **Difficulty:** Hard · **Object:** Case · **Topics:** Case, Custom Field, Validation

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/require-contact-for-escalated-cases

## Problem

When a Case is changed to Escalated status using a custom Is_Escalated__c checkbox, require ContactId. Add the checkbox field to the schema. Non-escalated cases do not need a contact for this rule.

## Constraints

Keep the trigger bulk-safe. Do not run SOQL or DML inside loops.

---
Source: ForceChallenges · last updated 2026-10-13
