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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Is it "wise" to create duplication of Data Entity ?

(1) ShareShare
ReportReport
Posted on by 195
Hi guys,
 
I want to add ranges in standard Entity : EcoResReleasedProductEntityv2, may I know what would be the best solution between /create extension/ or /duplicate/copy/ ? 
If by copying (duplicate), means the name will be a new name, I just afraid the relations such as the dataentity's staging table or its method will be broken. But if by extension, this object (data entity) already being extend before and use by other purposes which I tend to not interfere with what I trying to do, adding range in some of its table, even I'm planning to add some new datasource ? 
 
May I get an advice.
Thanks.
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at
    You forgot another viable option: composition. You can create a custom entity with the standard entity as a the data source and add extra logic to this new entity.
     
    When you duplicate an existing entity, you can't use the existing staging table and relations. You must duplicate the table as well and update relations and code referring to the original entity and staging table.
     
    Duplicating should be your last resort, because it comes with a high cost. You become responsible for maintaining the copy. Whenever Microsoft modifies the entity (new features, bug fixes) or create a new version, you need to apply these changes to your copy. If you fail to do it, your entity may behave incorrectly and it may stop working completely at some point.
     
    Using composition is better, because you don't duplicate logic of the standard entity. You may still need to update your entity when Microsoft adds a new field, for example.
     
    Use an extension when you want to change the standard entity, not to create a new entity for similar purpose. Of course, you can do it only if your changes are compatible with how the entity is used.
  • Voltes Profile Picture
    195 on at
    Hi Martin,
     
    Interesting. 
    But am I right to say if I create composite, it feels like I'm adding a same table which already in the structure which "maybe" un-necessary ? Because my 1st intention is to add range to the existing table, which is in InventTable. There is a custom field in my InventTable that I need this data entity to be filtered. The next steps, I believe this is more likely can do it with Composite, although I'm still not sure whether it is good nor how to do it correctly, is that I want to add the existing  InventModelGroupItem to its master table InventModelGroup, because I want to filter this data entity to only item with Stocked is true. (this is our company policy). Btw, why we're doing this, because I want to use this data entity for OData.
     
    Does it help or best solution to create a composite on this scenario ?
    Thanks for the advice.
     
  • Martin Dráb Profile Picture
    237,795 Most Valuable Professional on at
    I'm not sure what you mean by "adding a same table which already in the structure which maybe un-necessary". If you mean that you want to add join InventTable with the released product entity, I didn't meant that. You'll add the entity and apply the range to its field. If the field you want isn't currently exposed by the entity, you can fix it by an extension.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    You need to retrieve only records which are stocked. So in this case, if the field is already exposed via entity, then in the request URL itself you can add that filter without duplicating whole entity. This way development is not required.
  • Voltes Profile Picture
    195 on at
    Hi Martin,
     
    Ok, now it's a bit clear. But just to make sure, I will need to create a Composite entity contain EcoResReleasedProductV2 entity and InventTable entity.
    I just take a look and all I found for entity having names "InvenTable" are below:
     
    So the closest one is InvenTableBIEntity. Is it fine to use that ? But anyway the custom field that I want to use a range in InventTable not yet exposed there so I need to extend. But, this is the right concept as you are implying, right?
     
    For Bharani,
    Yes, but the plan is not using URL, and I should give the entity with pre-defined range already.
    So in this case, in relates to the Composite Entity, where should I add InventModelGroup ? And as I check there is no standard entity for this table as well, means I should create one ?
     
    Thanks.
     
     
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at
    Hi Tony,
     
    You mentioned you want to add a range and you will use it with OData. Can you talk more about the process? Do you have intentions to use the standard entity as well?
  • Voltes Profile Picture
    195 on at
    Hi Andre,
     
    Basically I'm gonna try to not change standard entity, but to use that as my base of new entity with the added range (add my custom field) and added new join table : InventModelGroupItem to InventModelGroup, then add range from there.
    Thanks.
  • Voltes Profile Picture
    195 on at
    Hi,
     
    Can admin help to mark this as close ? It is answered in the 1st reply.
    Thanks
  • André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at
    Thanks for your replies, Tony. I have marked the first reply from Martin as verified for you.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 549 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans