How can I prevent duplicate email addresses from being created?
|Knowledge Article Number||000171350|
|Description||I would like to know how I can prevent duplicate email addresses.|
|Resolution||You will need to create a new email address field that has been set as unique. This email address field can then be updated based on a workflow rule. You can follow the example directions below to create a workflow rule and custom field. The example directions are based on the Contact object. This is only for new records. You will need to either mass edit any existing records or do a mass update to populate the custom email address field.
To create a unique email address field:
1. Click on Your Name | Setup | App Setup | Customize | Contacts | Fields
2. Click the “New” button in the “Contact Custom Fields & Relationships” section.
3. Choose the “Email” data type.
4. Click the “Next” button.
5. Give it a name.
6. Make sure you check the box next to “Unique”.
7. Click the “Next” button until you are allowed to “Save”.
To create a workflow rule to update your custom field you just created with the value from the standard email address field you will need to follow these directions:
1. Click on Your Name | Setup | App Setup | Create | Workflow & Approvals | Workflow Rules
2. Click the “New Rule” button.
3. Choose “Contact” in the drop down.
4. Click “Next”.
5. Give it a name.
6. Choose “Created, and every time it’s edited”.
7. In the Rule Criteria section in the first drop down menu choose “Contact: Email” not equal to and then leave the value blank.
8. Click the “Save & Next” button.
9. In the Immediate Workflow Actions section click the “Add Workflow Action” drop down and click “New Field Update”.
10. Give the field update a name.
11. In the “Field to Update” drop down choose the field you created previously.
12. In the “Specify New Field Value” section choose “Use a formula to set new value”.
13. Click the “Show Formula Editor” link.
14. Click “Insert Field”.
15. Find the “Email” field that has the Type: Email and the API Name: Email.
16. Click the “Insert” button.
17. Click the “Save” button.
18. Click the “Done” button.
19. Click the “Activate” button.
There are also AppExchange applications that may help you. You can go to http://appexchange.salesforce.com/ and search for duplicate email or dedupe or de-dupe or other search terms to find apps that may assist you with preventing duplicate records.