add_entity_key
Adds an alternate key to a Dataverse table to enforce a uniqueness constraint or support race-safe upserts via keyed-PATCH.
Instructions
Create an alternate key on a Dataverse table (composite supported via key_attributes). Use for race-safe upserts via keyed-PATCH or to enforce a uniqueness constraint that the primary key doesn't cover. NOTE: Dataverse builds the supporting unique index asynchronously — the key is not usable for keyed lookups until its EntityKeyIndexStatus becomes 'Active'. Poll with list_entity_keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| display_name | Yes | Display name for the key | |
| logical_name | Yes | Logical name of the new key with publisher prefix (e.g. 'contoso_contactproviderkey') | |
| key_attributes | Yes | Logical names of attributes that compose the key (one for a single-column key, multiple for a composite key). Lookups and supported primitive types only — Dataverse rejects keys over Memo, image, or file columns. | |
| entity_logical_name | Yes | Logical name of the entity | |
| solution_unique_name | No | Solution unique name (defaults to the Default Solution) |