# What happens if you try to modify Trigger.old in any trigger event?

**Topic:** Apex Trigger · **Difficulty:** Easy · **Asked at:** TCS, HCL, Hexaware · **Tags:** apex-trigger, trigger, context-variables

Read it on the site: https://www.forcechallenges.com/interview-questions/what-happens-if-you-try-to-modify-trigger-old-in-any-trigger-event

## Answer

`Trigger.old` and `Trigger.oldMap` are always read-only. Attempting to change a field on them throws a runtime error: `Record is read-only`. Use them only for comparison with the new values, or to know what is being deleted.

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