# Prevent Lead Company Name Changes after Qualification

**Type:** Apex trigger · **Difficulty:** Hard · **Object:** Lead · **Topics:** Lead, Trigger.oldMap, Before Update

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/prevent-lead-company-change-after-qualification

## Problem

Once a Lead's Status is Qualified, do not allow its Company field to change. Other fields can still be updated. Use the old record to check its previous status.

## Constraints

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

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