EasyApex Triggeron Contact 10 ptsCreated Oct 12, 2026
Write a Contact trigger that stops duplicate contacts from being saved. A contact is a duplicate if its Email OR Mobile Phone matches another contact. Check both contacts coming in together and contacts already saved in the org. Show a simple error message on duplicate records. Contacts with different email addresses and mobile numbers should be allowed.
Constraints
Use one query per trigger batch. Do not run SOQL or DML inside a loop. A non-blank matching email OR mobile phone means the contact is a duplicate.