AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 11.09.2021, 15:19   #1  
Blog bot is offline
Blog bot
Участник
 
24,417 / 822 (76) +++++++
Регистрация: 28.10.2006
d365technext: Difference Between Replacement key, Alternate key, Surrogate key in AX 2012 and D365FO
Источник: https://d365technext.blogspot.com/20...ement-key.html
==============




Replacement key, Alternate key, and Surrogate key




WHAT IS A REPLACEMENT KEY INDEX?

While a surrogate key is great for lookup and database performance, it is not useful for the end-user because it gives no indication of the table’s purpose, or what related tables it is linked to. For this reason, Dynamics 365 Finance & Operations has added the ‘Replacement Key’ index property for tables. The replacement key index is a dropdown of alternate keys that have been specified for the table. There can be any number of alternate keys for a table but only a single replacement key. More than one field can be specified under a replacement key, and it is these fields that will be displayed to the end-user on a form instead of the surrogate key field.

A replacement key is an alternate key that the system can display on forms instead of a meaningless numeric primary key value. Each table can have a maximum of one replacement key.


The replacement key is chosen by setting the ReplacementKey property on the table. The drop-down list offers every alternate key as an available value.



WHAT IS AN ALTERNATE KEY?

A table can have any number of alternate keys. An alternate key may be a natural key or a single field primary key used in foreign or primary key relations with other tables. In either case, to set one, the user must create a new index and then set AllowDuplicates to “No” and AlternateKey to “Yes”. If AllowDuplicates is not set to “No” then AlternateKey should be greyed out and uneditable


WHAT IS A SURROGATE KEY?

In Dynamics 365 Finance & Operations, a surrogate key is the auto-generated primary key for a table in the database. The surrogate key is linked to the already existing RecId field within any table. This means that the surrogate key is a unique 64-bit integer value that is mandatory for the table and cannot be changed or have duplicates. The fact that it is a 64-bit integer (int64) value means table operations normally perform faster than other types of fields such as string fields. This is the main strength of surrogate keys.


Источник: https://d365technext.blogspot.com/20...ement-key.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
d365technext: Currency Conversion X++ AX7, D365FO and AX-2012 Blog bot DAX Blogs 0 05.12.2018 15:11
d365technext: Pass field value from SalesTable to CustTrans in AX 2012 & D365FO Blog bot DAX Blogs 0 15.11.2018 09:11
d365technext: Create Contact Person for Vendor Or Customer AX 2012 & D365FO Blog bot DAX Blogs 0 01.11.2018 16:12
d365technext: Create Vendor using X++ D365FO & AX-2012 Blog bot DAX Blogs 0 03.09.2018 21:12
d365technext: Record sorting D365FO, AX 7 and AX-2012 Blog bot DAX Blogs 0 08.08.2018 21:12
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 10:59.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.