Skip to main content
Dynamics 365 Community / Forums / Finance forum / How to handle RefRecId...
Suggested answer

How to handle RefRecIds in custom data entity?

editSubscribe (2) ShareShare
ReportReport
Posted on by 153
Hi experts,

I have created a custom table for storing legal entity and their address. My table include the following fields. 



I have to now create data entity for the above table. Here is the data entity I have tried to create. 





I need to import the data through the following data entity, where the record first insert into the LogisticsLocation table and then into LogisticsPostalAddress and finally the LogisticsLocation table RecId insert into my custom table for storing the address. Kindly, assist me how can I achieve the data import into my custom table.

Currently, when I am importing data it is giving me the following error 'Error(s) occurred while writing entity record d365fo' where I set the LocationId to auto generation in field mapping. 

I have used City, Street, StreetNumber, ZipCode, CountryRegionId from LogisticsPostalAddress datasource. The highlighted field LocationId is from LogisticsLocation datasource. The data entity is exporting correctly.