[D365] How to create an alternate key

This post will show you how to quickly create an alternate key. If you want to know more about alternate keys please check out this post.

First you should open your customizations (either default solution or a dedicated solution that contains your customizations) and go to the entity where you want to create an alternate key.

In this post I’ll create an alternate key on contact entity using emailaddress1 field.

alternatekey

Select now one or more available attributes, I selected Email (emailaddres1)

selected attribute

Now you can save and close. A system job creates an index for Email in the database. The status changes from “pending” to “Active”

pending

active

You can now test your alternate key by creating two contacts with the same email address, while creating the second record you should have the following error

duplicaterecord

 

Advertisements

One thought on “[D365] How to create an alternate key

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 )

Google photo

You are commenting using your Google 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