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, ...
Answered

Data Entity Wizard not recognizing Alternate Key index added via table extension on DocuRef

(0) ShareShare
ReportReport
Posted on by 87
Hi everyone,
 
I am trying to create a custom data entity on the DocuRef table in D365 F&O, but the Data Entity Wizard keeps showing the error:
 
"The natural key for the table DocuRef was not found."
 
Here is what I have done so far:
1. Created a table extension on DocuRef 
2. Added a new field ESSLineNum (Int64) to the extension
3. Created a unique index ESSLineNumIdx on that field with Allow Duplicates = No and Alternate Key = Yes
4. Filled all existing ESSLineNum records with unique sequential values via SQL
5. Built and synced successfully
 
But the wizard still shows the natural key error and blocks me from proceeding.
 
Any help is appreciated. Thank you
 
Categories:
I have the same question (0)
  • Raed Bzour Profile Picture
    87 on at
    here how I added the unique field and index as a key
    the most interesting thing is if the table is a custom table, it will work 100% I've tried it
  • CP04-islander Profile Picture
    262 on at
    Thank you for sharing
  • Verified answer
    Martin Dráb Profile Picture
    239,178 Most Valuable Professional on at
    First of all, note that there already is an entity for DocuRef table: DocuRefEntity. Consider using it instead of developing a new one. Note that DocuRefEntity isn't intended to be used directly, but rather as a data source of an entity specific to the particular type of data. For example, look CustoemrAttachmentsV2Entity.
     
    Regarding your current problem, note that it's just a limitation of the wizard and you don't have to use it. Instead, you can duplicate DocuRefEntity and modify the copy as you like.
  • Raed Bzour Profile Picture
    87 on at
    Thanks Martin, I really appreciate that. 

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 657

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 190 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans