web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Project integration D3...
Power Apps
Unanswered

Project integration D365FO to CDS create duplicate

(0) ShareShare
ReportReport
Posted on by 45

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

I have the same question (0)
  • kheiman Profile Picture
    29 on at

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

     

  • v-xida-msft Profile Picture
    on at

    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,

  • sang73 Profile Picture
    45 on at

    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 Profile Picture
    45 on at

    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 ? 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard