Define alternate keys using solution explorer

Solution explorer provides one way to view and create alternate keys for Microsoft Dataverse.

The Power Apps portal enables configuring the most common options, but certain options can only be set using solution explorer.
More information:

Important

If the data within a column that is used in an alternate key will contain one of the following characters /,<,>,*,%,&,:,\\,? then GET or PATCH actions will not work. If you only need uniqueness then this approach will work, but if you need to use these keys as part of data integration then it is best to create the key on columns that won't have data with those characters.

Open solution explorer

Part of the name of any alternate key you create is the customization prefix. This is set based on the solution publisher for the solution you’re working in. If you care about the customization prefix, make sure that you are working in an unmanaged solution where the customization prefix is the one you want for this table. More information: Change the solution publisher prefix

  1. From the Power Apps portal select Solutions, and then on the toolbar, select Switch to classic.

  2. In the All Solutions list select the unmanaged solution you want.

View alternate keys

  1. With solution explorer open, under Components expand Entities and select the table where you want to view alternate keys.

  2. Expand the table and select Keys.

    View alternate keys.

Create an alternate key

  1. While viewing alternate keys, select New.
  2. On the form, enter the Display Name. The Name column will be auto-populated based on the Display Name.
  3. From the Available Attributes list, select each attribute and then Add > to move the attribute into the Selected Attributes list. Create Alternate key.
  4. Select OK to close the form.

(Optional) View the system job tracking creation of indexes

  1. While viewing alternate keys after you have created a new alternate key you will see a row for the key you created.

  2. In the System Job column you will find a link to the system job that monitors the creation of the indexes to support the alternate key.

    This system job will have a name that follows this pattern: Create index for {0} for table {1} where 0 is the Display Name of the alternate key and 1 is the name of the table.

    The link to the system job will not be displayed after the system job completes successfully. More information: Monitor and manage system jobs

Delete an alternate key

While viewing alternate keys, select Delete command..

See also

Define alternate keys to reference rows
Define alternate keys using Power Apps portal
Developer Documentation: Work with alternate keys