# Require Next Step for Open Opportunities

**Type:** Apex trigger · **Difficulty:** Medium · **Object:** Opportunity · **Topics:** Opportunity, Before Insert, Before Update, Validation

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/require-next-step-for-open-opportunities

## Problem

Before an Opportunity is saved, require the Next Step field if the stage is still open. An Opportunity with a Next Step can be saved.

## Constraints

Process every record in the batch and handle blank values safely.

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