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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Composite entity key

(0) ShareShare
ReportReport
Posted on by 536

Hi,

If we want to make a composite entity. Should the entity key of the main entity be repeated in all child entities?

I mean if let's say in the composite entity, the main entity was EntityA where the Entity key is fieldA and below this enity we have 2 other entities on the same level (Entity B and Entity C)

Should the entity key for EntityB and EntityC contain field A as a must with another unique field?

Another question,  can I create a composite entity with the entity repeated? I mean it consists of EntityA and EntityA?

I know it doesn't make sense but can we?

In this case, can the entity key for each one be fieldA only? Or should the main datasource have Entity key as fieldA and the other entity should have fieldA with RecId for example? 

I have the same question (0)
  • Martin Dráb Profile Picture
    238,828 Most Valuable Professional on at

    That child enitities in a composite entity are related to the parent entity through its entity key is a typical scenario. But it doesn't have to be true in all cases. A child entity could be related to a non-key field of the parent entity.

    I guess you could use the same entity twice in the same composite entity. You can simply try it to know it for sure.

    I don't understand the last question. The entity key should contains fields needed to uniquelly identify a record in the entity. It has nothing to do with whether it's used in a composite entity and how. Exposing RecIds would be wrong. It's meaningless to uses and other systems; youy should use a natural key instead.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 517 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 440

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans