Thursday, September 22, 2016

Alternative unique key for an entity

In CRM each entity has unique identifiers defined as GUIDs. This is primary key for each entity. 

Sometimes, when integrating CRM system with other system or converting legacy system into CRM, we need to store existing database unique key into CRM. 

From CRM 2015 Online (update 1) Microsoft introduced alternate keys for entities. 

Alternate keys you can now define an attribute in a CRM entity to correspond to a unique identifier (or unique combination of columns)

Key points for Alternative key
  • Alternate key defined on Decimal number, Whole Number or Single line of Text attributes only.
  • You can combine two or more different types of attributes into Alternate Key.
  • You can create key on maximum 16 columns / attributes combination.
  • Total Key size should not violate SQL based index constraints like 900 bytes per key.
  • For each entity you can define maximum 5 alternate keys. 



3 comments:

  1. Does anybody tried to upsert a record with an alternate key containing single quotes in the value. I'm using a PATCH request via the webapi but it fails to upsert the record...

    ReplyDelete
  2. THANK YOU FOR THE INFORMATION
    PLEASE VISIT US
    CRM Solutions



    ReplyDelete