Context Variable Considerations:
Be aware of the following considerations for trigger context variables:
Be aware of the following considerations for trigger context variables:
- Trigger.new and trigger.old Cannot be used in Apex DML operations.
- You can use an object to change its own field values using trigger.new, but only in before triggers. In all after triggers, trigger.new is not saved, so a runtime exception is thrown.
- trigger.old is always read-only.
- You Cannot delete trigger.new.