# Block Contact Deletion for VIP Contacts

**Type:** Apex trigger · **Difficulty:** Medium · **Object:** Contact · **Topics:** Contact, Before Delete, Trigger.old, addError

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/block-vip-contact-deletion

## Problem

Do not allow a Contact to be deleted when Title is VIP. Other Contacts can be deleted. Use the delete trigger context and show a clear message.

## Constraints

Write bulk-safe trigger logic. Do not run SOQL or DML inside a loop.

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