cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sang73
Level: Powered On

Project integration D365FO to CDS create duplicate

Hello

I have created following Entity:

 

image.png

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

image.png

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

 

image.png

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

 

image.png

 

Please advise if/what I am doing something wrong

 

Thank and Regards

4 REPLIES 4
kheiman
Level: Powered On

Re: Project integration D365FO to CDS create duplicate

Primary Field that you are showing is NOT a primary key. https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/data-platform-create-entity - 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 Team
Community Support Team

Re: Project integration D365FO to CDS create duplicate

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.
sang73
Level: Powered On

Re: Project integration D365FO to CDS create duplicate

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

SD

sang73
Level: Powered On

Re: Project integration D365FO to CDS create duplicate

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

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Top Community Contributors for September  2019

Top Community Contributors for September 2019 🎉🎉

Let's thank our top community contributors

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Users Online
Currently online: 211 members 4,218 guests
Please welcome our newest community members: