Posts

Showing posts with the label PackingSlip

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

Quick and Easy: D365FO VendPackingSlipTrans Entity

Image
Although D365FO Entities has over 2000+ entities available out of the box, for my surprise it lacks a very important entity: Vendor Packing Slips. In this post I'll show my solution to have Vendor Packing Slips transactions available by odata and/or DMF. Note: If you try to create the entity by using the Data Entity Wizard you won't be able to use neither VendPackingSlipJour/Trans as DataSource as they lack of a proper sequence number. You will get the infamous "The natural key for the table xxxxxxx was not found". You can take the path of extending the table by adding a sequence number or you can follow my example. Solution: Use the Purchase Order table as Datasource and build the query to VendPackingSlipTrans. Specifically, you need to relation PurchTable->VendPackingSlipJour->VendPackingSlipTrans. Make sure your Entity looks like the image below Finally add relevant fields out of the datasources, for example: Now you can test...