Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Project integration D365FO to CDS create duplicate


I have created following Entity:



When creating this Entity, I defined RecId as being the Primary Key.


I then use a Data Integration project from D365FO to CDS to populate this Entity



Customeraccount is a unique identifier of a customer.


Problem is than every time I run the integration project, It add new lines. as I a result, I get duplicate customers in my table.


When exploring further, I found something a bit weird in my entity definition (see below). I would have expected my RecId field to be set a Primary Key.

I tried creating again the entity, but it always create a Primary key field different than the one I set in the Entity creation form




Please advise if/what I am doing something wrong


Thank and Regards

Frequent Visitor

Primary Field that you are showing is NOT a primary key. - CDS automatically creates a primary key of type GUID for every entity created in CDS.


"By default, every entity contains a Primary Field, which is used by lookup fields when establishing relationships with other entities. Typically the primary field stores the name or primary description of the data stored in the entity. You may update the name and display name of the primary field before saving the entity for the first time."


Community Support
Community Support

HI @sang73 ,

Do you want the RectId field not be populated with duplicated values in your Entity?


Based on the issue that you mentioned, I think you have some misunderstading on Primary Field in CDS Entity.


When you create a CDS Entity, it would auto-generate a Primary Field (in default, it is 'Primary Name' field) within your Entity. The Primary Filed in CDS Entity is a Required field rather than a Primary Key field, the Primary Key field (Unique Identifier field) would be generated by Entity itself.


Within your CDS Entity, the Primary Key field (Unique Identifier field) should be D365FO Customer. Within your CDS Entity, the Primary Key field should be similar as below:2.JPG

Note: In default, the Primary Key (unique identifier) field should be has same name as your Entity.


As an alternative solution, within your Fields Mapping panel in your Data Integration project, please click "Advanved Query and Filtering" option to open Power Query panel:3.JPG

Within the opened Power Query panel, select the Column field (of your D365 FO table) you want to import into the RectId field of your CDS Entity, then click "Reduce Rows"-> "Remove Duplicates" option to remove the duplcaited records from the source column from your D365 FO Table:4.JPG

after that, click "OK" button, and save your Data Integration Project.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-xida-msft , @kheiman 


thanks for your clarification about Primary field. I confused it with Primary key

that being said, how to create a proxy of my D365FO table that is being "updated" on regular basis ?

when I call my data integration project several time, it insert new records instead of updating the existing records.


looking for your insights


hi @v-xida-msft , @kheiman 


any chance you guys know how to create a simple proxy of data, that would be synch on regular basis ? 

Helpful resources

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,216)