Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

How to deal with "Natural key was not found"

(0) ShareShare
ReportReport
Posted on by 592

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,

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: How to deal with "Natural key was not found"

    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.

  • Voltes Profile Picture
    Voltes 592 on at
    RE: How to deal with "Natural key was not found"

    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
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: How to deal with "Natural key was not found"

    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
    Voltes 592 on at
    RE: How to deal with "Natural key was not found"

    Hi,

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

    Thanks,

  • Shooowtek Profile Picture
    Shooowtek 737 on at
    RE: How to deal with "Natural key was not found"

    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/

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans