With Dynamics CRM Online 2015 Update 1, a new feature that was added is the use of Alternate Keys. This is a feature aimed mainly at processes around integration and synchronization of data across various systems. How many times we have tried to map data between two or more systems, and we’ve ended up creating a mapping table in the ETL process to handle this? Now, thanks to this new feature, we can do that kind of mapping directly in Dynamics CRM.

Behind the scenes, the Alternate Keys is the ability to add a new attribute to a CRM entity that corresponds to a unique identifier or a composite key used by an external system that integrates with ours.

This can be achieved either through the user interface (configuration) or in custom code. This article HERE defines how to add alternate keys using the UI. On the other hand, this article HERE shows us how to do this programmatically.

NOTE: Up to 5 (five) different alternate keys can be defined for an entity.

On creation of a new Alternate Key, only the following record types can be used: String, Integer and/or Decimal.

Behind the scenes, once a new Alternate Key is defined, the platform starts a new system job that creates a database index which will enforce uniqueness and optimize performance. This process can take longer depending on the number of records existing.

NOTE: Possible error – when Dynamics CRM cannot find a specific key value, the following error message is returned:

A record with the specified key value does not exist in <entity> entity

Take advantage of this new functionality as needed, and update your old integration processes.