Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

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

(1) ShareShare
ReportReport
Posted on by 144
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.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    Is it "wise" to create duplication of Data Entity ?
    Thanks for your replies, Tony. I have marked the first reply from Martin as verified for you.
  • Voltes Profile Picture
    Voltes 144 on at
    Is it "wise" to create duplication of Data Entity ?
    Hi,
     
    Can admin help to mark this as close ? It is answered in the 1st reply.
    Thanks
  • Voltes Profile Picture
    Voltes 144 on at
    Is it "wise" to create duplication of Data Entity ?
    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.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,187 Super User 2025 Season 1 on at
    Is it "wise" to create duplication of Data Entity ?
    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
    Voltes 144 on at
    Is it "wise" to create duplication of Data Entity ?
    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.
     
     
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    Is it "wise" to create duplication of Data Entity ?
    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.
  • Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    Is it "wise" to create duplication of Data Entity ?
    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.
  • Voltes Profile Picture
    Voltes 144 on at
    Is it "wise" to create duplication of Data Entity ?
    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.
     
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,966 Most Valuable Professional on at
    Is it "wise" to create duplication of Data Entity ?
    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.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,187 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,966 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans