# When an Account Phone is updated, put the old phone number and new phone number into the Account Description field.

**Topic:** Development · **Difficulty:** Easy · **Asked at:** Infosys, Mphasis, Hexaware · **Tags:** apex-trigger, trigger, coding, scenario

Read it on the site: https://www.forcechallenges.com/interview-questions/when-an-account-phone-is-updated-put-the-old-phone-number-and-new-phone-number-into-the-account-description

## Answer

Use `before update` so the Description is saved without an extra DML.

```apex
trigger AccountTrigger on Account (before update) {
    for (Account a : Trigger.new) {
        Account old = Trigger.oldMap.get(a.Id);
        if (a.Phone != old.Phone) {
            a.Description = 'Old Phone: ' + old.Phone + ', New Phone: ' + a.Phone;
        }
    }
}
```

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