# Prevent Opportunity Probability Decrease

**Type:** Apex trigger · **Difficulty:** Medium · **Object:** Opportunity · **Topics:** Opportunity, Trigger.oldMap

Practice this problem interactively (write and run your Apex trigger against realistic data): https://www.forcechallenges.com/problems/prevent-opportunity-probability-decrease

## Problem

When an Opportunity is updated, do not allow Probability to decrease. Keeping it the same or increasing it is allowed. Use old and new values to check the change.

## Constraints

Write bulk-safe trigger logic and do not run SOQL or DML inside loops.

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