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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Convert composite entity to single entity

(0) ShareShare
ReportReport
Posted on by 496

Hi,

If we have a composite entity that we want to convert to single entity. (For import purposes)

- Is converting a composite entity to single entity and using it for import possible?

- Should the entity key for the single entity contain all entity key fields that are found in each entity in the composite entity? 

Or Should the entity key for the single entity contain all Unique fields that are found in each table in each entity of the composite entity? 

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

    There is no tool for merging the entities to one. You need to create a new entity by yourself. Note that you can potentially use the existing entities as data source of the new entity.

    How the entity key should look like depends on how the entity should behave. Using entity keys of the originally entities (without duplicates) will likely be a good approach in most cases.

  • DELDYN Profile Picture
    496 on at

    Hi Martin,

    Do you mean that instead of using the tables inside each entity to create the new single entity, Then I can put the entities of the composite entity themselves in the new entity and join them? But if I still use tables then it's the same thing right?

    And the entity key should be the entity key of each one without duplication?

  • Martin Dráb Profile Picture
    238,562 Most Valuable Professional on at

    Yes, using entities as data source is an option, if it makes things easier. If it doesn't add any value, use tables directly.

  • DELDYN Profile Picture
    496 on at

    Hi Martin,

    Another question please:

    If I'm going to take all entity keys of the composite entity and put it in a single entity. In general, should the entity key fields be mandatory in the entity itself or the staging table?

    I don't want to be forced to fill all entity keys when uploading. Does that mean I need to remove them from the entity key or it's ok to have entity key that is not mandatory?

    Looking at standard staging tables of the entities inside the composite entity, I can see the primary index containing the fields of the entity key but they are not mandatory in the staging table..which means they are not following best practices. so I can do the same right?

  • Martin Dráb Profile Picture
    238,562 Most Valuable Professional on at

    I can't comment on your data model, such as which fields must be mandatory.

    Usually all key fields are mandatory, except of enums, where 0 is a valid value.

  • DELDYN Profile Picture
    496 on at

    Hi Martin,

    If u look at SalesOrderHeaderV2Entity for example

    The entity key is sales order number

    This field on entity level is set to Mandatory No

    Also this field on staging table is set to Mandatory No even though it's part of the primary Index of the table

    So based on that, I concluded that there is no need to make all fields mandatory, but still we can add them to entity key, even though there is a BP that says make them mandatory.

    So I just want to make sure that, if I convert the composite entity to a single entity, and put the entity key as the combination of the entity keys of all entities In the composite entity, then that would be ok. Even if not all fields are mandatory.?

    Cause as u know each entity in composite entity has entity key...but I can import using composite entity but without filling one of the entities even if it has a mandatory field right?

  • Martin Dráb Profile Picture
    238,562 Most Valuable Professional on at

    Whether it'll be OK or not depends on your requirements. Does it makes sense to create such a record? If fields are mandatory on the table and not on the entity, does it mean that the entity will generate their values (e.g. from number sequences)? Do you want to be able to insert multiple records with empty values to the straging table?

    I can't tell you that - it depends on what you want.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

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... 673 Super User 2026 Season 1

#1
André Arnaud de Calavon Profile Picture

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

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 391 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans