web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to deal with "Natural key was not found"

(0) ShareShare
ReportReport
Posted on by 596

Hello,

While creating new Data Entity for my custom table, I keep getting the error : "Natural key was not found". As per my understanding is in the table it supposed to have unique key, or it's better if we have primary key as the index, however I already set this key. 

So in my Index file which is a collection of fields, is set to Allow duplicates to No. And in the table I put this index as Primary Key.

Also actually, although not too sure, I put this index key as Alternate key. The reason is only because it is one of the rule if I'm checking through think link: 

https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/data-entities/data-entity-wizard-rules

Further more is this table is still empty. 

Anyone know what is the problem ? And what actually the requirement to meet this Natural Key ?

Thanks,

I have the same question (0)
  • Shooowtek Profile Picture
    843 on at

    Hi,

    The problem may be that your table uses RecId as its primary index, and the Data Entity Wizard does not support tables with a RecId-based primary key.

    If your table's architecture does not allow you to create a primary key, you can try this solution: 

    https://d365ffo.com/2021/06/28/ax-d365fo-how-to-solve-the-error-the-natural-key-for-the-table-was-not-found-in-a-data-entity/

  • Voltes Profile Picture
    596 on at

    Hi,

    No, I didn't use RecId for this one.

    Thanks,

  • GirishS Profile Picture
    27,833 Moderator on at

    Hi Lars Volt,

    What exactly is the issue?

    Can you elaborate on this?

    Also refer to the below thread which explains about the documentation you added.

    https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/303537/what-does-natural-key-expansion-of-surrogate-foreign-keys-mean

    Thanks,

    Girish S.

  • Voltes Profile Picture
    596 on at

    Hi Girish,

    Yes, as what I mentioned above, I created a new table, and added Index key (made of collection of fields but no RecId). I've set this key as my primary index in the table's property. Also in that Index key I set Not allow duplicates and put as Alternative key.

    While this table still empty, create Data Entity using Wizard, but still there is an error "There is no natural key"

    pastedimage1675175064068v1.png

    I read the thread, the learning docs, and some blogs couple of time actually but somehow I didn't get the correct means. 

    Thanks,

  • GirishS Profile Picture
    27,833 Moderator on at

    Please do a build and sync of the model from the menus and try creating again.

    Also confirm that you are selecting correct table in data entity creation wizard.

    Thanks,

    Girish S.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 512 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 386

#3
Adis Profile Picture

Adis 259 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans