Microsoft Dynamics CRM 2015 Update 1 introduced Alternate Keys. Often used in integration efforts to capture record identifiers from an external system, Alternate Keys can also be used as Composite Keys to ensure data integrity by not allowing records with duplicate values in the key attribute fields to be saved. Alternate Keys (Composite Keys) can function as a scaled-down Duplicate Detection rule. In today’s blog, we will focus on how to use Alternate Keys as an alternative for duplicate detection rules. Let’s begin!

Note: When using Alternate Keys in this manner, be sure that the combination of attributes selected truly represents a unique value.

Keys are now available as an entry in the entity section of Customizations.

1. First, navigate to System à Customizations
à Customize the System.

2. Expand the Entity.

3. Click Keys and then New.

4. Provide a Display Name.

5.Select multiple attributes to act as a Composite, Unique key.

6. Add the selected attributes. In this instance, we chose First Name, Last Name, and Mobile Phone to be the unique keys.

Note: Only the data types of Single Line of Text, Whole Number, and Decimal Number are available for use.

7. Click OK. An indexing System Job will now be created.

That’s it! Your Composite/Alternate Key has now been created!

Now, when you create a record with the same First Name, Last Name, and Mobile phone number as another entry in the system, you will receive the following error message:

Unlike CRM’s Duplicate Detection Jobs and Rules, which give you the opportunity to ignore the duplicate, this method provides a hard stop and the record must be changed in order to save it.

That’s all for our blog today! If you are interested in learning more about Microsoft Dynamics CRM, consider attending PowerObjects’ annual PowerUp conference in Minneapolis, MN. This two-day event, November 10-11, features over 60 breakout sessions with tracks for all experience levels. An optional hands-on day will be held at the PowerObjects training facilities on November 12 as well. You will NOT want to miss it! You can view the detailed agenda and register on our website. PowerUp is the CRM event of the year, so register today to secure your spot!

Happy CRM’ing!