Posts

Showing posts from April, 2021

Infamous "The natural key for some table was not found" solved once and for all

Image
Data entities in Dynamics 365 for Finance and Operations (D365FO) are awesome, as long as you can use the wizard to create them. Quite often you will find that some tables throw the infamous "The natural key was not found". This is because many tables actually don't have unique indexes - for many reason - but here I'll present a general solution to create any entity - read-only entities - in very simple steps.  Capture when trying to create an entity for InventTrans table In this example I'll create an entity for the InventTrans table as this table doesn't have an unique index.  Step 1: Use the wizard to create an entity but select any know table that happens to have unique indexes. In this case I'll select InventTable.  In the next screen Deselect all the fields and click Finish. You will end up with an entity with a single datasource Step 2:  In this step we need to create a View that is based on the table that we want to expose as an entity - in this ca...