Work with Alternate Keys

Concept of Alternate Keys has been introduced with Microsoft Dynamics CRM Version 2016.

All Microsoft Dynamics CRM records have unique identifiers defined as GUIDs. These are the primary key for each entity. However if you have alot integrated systems in your organization – it would be very difficult for other systems to retrieve or update records using the guids as they wont necessarily store CRM’s internal GUIDs. Hence you can create an alternate key which is actually a data in other systems – they can easily update or retrieve data from CRM using this.

Only below field types can be added as an alternate key :

  1. Decimal Number
  2. Whole Number
  3. Single Line of Text
  4. Date Time [ Only with Dynamics 365 v9 or above]
  5. Lookup [ Only with Dynamics 365 v9 or above]
  6. Picklist [ Only with Dynamics 365 v9 or above]

Point to note is that for a single entity, only 5 alternate keys are allowed in CRM.

Apart from Above , Alternate keys will stop creating duplicate records in the system, be it normal creation , excel import , or from external service.Wow how cool is that!

To Create an alternate key , go to customization > Entity> Expand the entity and look for “Alternate Keys” option > click on New and give display name and schema name > select the field for which you want to enable it > click on the right arrow > click on Save.

when you save an alternate key it, you are actually creating an async job which goes through following status :

  • Pending
  • In Progress
  • Active
  • Failed

alternatekey

Once status shows “Active” it means its ready to be used:

alternatekey1

you can very well use alternate keys with WebApi , take reference from the below :

https://community.dynamics.com/crm/b/dutchcrmandsharepoint/archive/2016/12/06/using-alternate-keys-with-the-webapi

Write to me if you have any questions on this topic.

I hope this helps!

Cheers!

Advertisement

2 thoughts on “Work with Alternate Keys

  1. Pingback: Alternate Key Creation – Stuck On Pending Status – Passion Dynamics

  2. Pingback: Alternate Key Creation – Stuck On Pending Status - Microsoft Dynamics CRM Community

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.