![alternote duplicate notes alternote duplicate notes](https://www.liberiangeek.net/wp-content/uploads/2012/04/sources.list_precise.png)
If the key size doesn't meet the constraints, an error message will be displayed. When a key is created, the system validates that the key can be supported by the platform, including that the total key size does not violate SQL-based index constraints like 900 bytes per key and 16 columns per key. However, many of the attributes that contain address information in entities such as Account and Contact are logical and cannot be used in a key, even though they are writable. Most logical and inherited attributes are configured as read-only. More information: Valid operations on attributesĪttributes must not have Field-level security appliedĪttributes must not be logical or inherited The attributes DateTime, Lookup, and Picklist are not available for on-premises versions of Dynamics 365 Customer Engagement.Īttributes must be valid for create and updateĮach attribute used in a key must support both create and update. Only attributes of the following types can be included in alternate key definitions: Attribute Type You should be aware of the following constraints when creating alternate keys: This message takes the entity name and EntityKeyMetadata values as input to create the key. Once the key attributes are set, you can use CreateEntityKey to create the keys for an entity. To define alternate keys programmatically, you first have to create an object of type EntityKeyMetadata (or use EntityKeyMetadata EntityType if working with Web API).
![alternote duplicate notes alternote duplicate notes](http://www.drivehq.com/web/brana/scr.ddo.small.jpg)
For more information about using the customization tools, see Define alternate keys to reference CRM records.
![alternote duplicate notes alternote duplicate notes](https://www.apeaksoft.com/images/solution/find-duplicates-in-itunes-min.jpg)
You can create alternate keys programmatically or by using the customizations tools. This topic provides information about defining alternate keys in the data model. Once you identify the attributes that are unique to the entity, you can declare them as alternate keys through the customization user interface (UI) or in the code. You must be able to define which attributes represent a unique identity for your records. This alternate key can be used to uniquely identify a record in Customer Engagement in place of the primary key. With alternate keys you can now define an attribute in a Customer Engagement entity to correspond to a unique identifier (or unique combination of columns) used by the external data store. However, sometimes you can't modify the external database. This allows you to have a local reference to link to the Customer Engagement record. When you need to integrate with an external data store, you might be able to add a column to the external database tables to contain a reference to the unique identifier in Customer Engagement. These are the primary key for each entity. All Dynamics 365 Customer Engagement (on-premises) records have unique identifiers defined as GUIDs.