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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 01.03.2019, 23:14   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
stoneridgesoftware: Dealing with the “The natural key for the table was not found” error in the Dynamics 365 Data Entity Wizard
Источник: https://stoneridgesoftware.com/deali...entity-wizard/
==============

Recently I was asked to create a data entity for the AssetTrans table in Dynamics 365 Finance and Operations. There isn’t a stock entity for AssetTrans, so I turned to the Data Entity Wizard to streamline the entity creation process:



It was then that I ran into the dreaded “The natural key for the table was not found” error in the Dynamics 365 Data Entity Wizard:



The problem is that the AssetTrans table uses RecId as its primary index, and the Data Entity Wizard doesn’t support tables with a RecId-based primary key. Further, we cannot add a new index to AssetTrans and set it as the natural key via a table extension, as the Primary Index parameter is disabled in table extensions.

When faced with this issue in the past I have taken a manual approach: find an existing data entity, duplicate it, and replace its contents with references to the table I wanted to specify in the wizard. This approach also required me to manually create the staging table and security privileges—not a huge burden, but significantly more work than letting the wizard take care of it for me!

This time, I tried something new. I duplicated the AssetTrans table as MyAssetTrans and created a new non-RecId based primary index for it:



I then ran the Data Entity Wizard again, using the MyAssetTrans table as the primary datasource:



This time, the wizard proceeded to the next step of selecting the fields I wanted included in the entity:



Once the wizard completed, I had my data entity, staging table, and security privileges, but I still had a problem: the entity was based on MyAssetTrans, not AssetTrans. Fortunately, all I had to do was change the Data Source on the data entity from MyAssetTrans to AssetTrans:





And I had my AssetTrans entity ready to go. If you’ve run into this problem, I hope this article helps! If you need more assistance, we have a great support team. Contact us to learn more.



Источник: https://stoneridgesoftware.com/deali...entity-wizard/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
dynamicsaxse: November 2018 Release – Dynamics AX2012 R3 update Blog bot DAX Blogs 0 15.11.2018 09:11
stoneridgesoftware: PrecisionForms for Document Management in Dynamics AX Blog bot DAX Blogs 0 14.09.2017 19:11
stoneridgesoftware: Using Liquid Templates and FetchXML to Retrieve Data in a Dynamics 365 Online Portal Blog bot Dynamics CRM: Blogs 0 27.07.2017 23:15
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 14 Blog bot Dynamics CRM: Blogs 0 12.07.2013 07:13
axinthefield: Dynamics AX Event IDs Blog bot DAX Blogs 0 01.03.2011 22:11
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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