locked
Loading an entity with reference data from another entity RRS feed

  • Question

  • I have many different entities that all revolve around a main product entity. The main product entity has several useful attributes that users want to see but should not be able to edit. I can add the name and code of the main product entity as a domain based attribute, but how do I get the other associated reference attributes to also show up in the secondary entities that use the main product entity?

    For now I'm just coding around it but it's quickly becoming a huge chore.

    Thursday, August 8, 2013 1:24 PM

Answers

  • Hi Labry,

    If you want to show other attributes than Code and Name in the entites related to the main product entity, you need to duplicate those attributes in the related entities and create a business rule that copy values from the main product entity to the duplicate attributes in the related entities.

    Tuesday, September 24, 2013 9:39 AM
  • In the UI a user can always navigate from a Pricing entity to its related Product entity, or you could provide a custom UI that did this.

    Also you can use business rules to copy attributes down to related entities, but that's probably no better a solution than using a job and the staging tables.

    But other than that, you're not missing anything.  There's no way in the built-in UI to include attributes from related entities.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Tuesday, September 24, 2013 5:15 PM

All replies

  • Hi Labry,

    If you want to show other attributes than Code and Name in the entites related to the main product entity, you need to duplicate those attributes in the related entities and create a business rule that copy values from the main product entity to the duplicate attributes in the related entities.

    Tuesday, September 24, 2013 9:39 AM
  • Hi Guillame,

         That's what I'm doing and it is a chore. Hopefully the MDS dev team will come up with a better solution.

    Tuesday, September 24, 2013 12:57 PM
  • Can you explain your model a bit?  Why do attributes from the Product entity need to be copied to the other entities? 

    What process are you using to synchronize the attribute values from Product to the other entities?  You should be able to write a simple stored procedure to do this through the entity-based staging tables, and run it in a SQL Agent job.  This is how you replicate entities between models, which is pretty common.

    Are you modeling different subtypes of product?  If so, have you considered using attribute groups for core product attribtues and for each product subtype?

    David


    David http://blogs.msdn.com/b/dbrowne/


    Tuesday, September 24, 2013 2:52 PM
  • Hi David,

        I was hoping the attributes would not have to be copied but there seems to be no way to present the user with associated attributes for reference purposes only without cloning the attributes and their values. The information is valuable to the user but they should never be able to change the reference data.

    We currently use SPs and jobs, that's no big deal if your scope is small. But when you do that, you add a lot more support work. It would be fantastic to be able to just pick additional attributes to view from a domain based attribute when you create your entity.

    For example, Let's say you have an entity named pricing that is using a domain based attribute of product. In the pricing entity you will only get to see Code and Name of the Product entity. But what if there are 25 attributes in the Product entity and the user needs to be able to see 10 of those 25 from within the pricing entity?

    Maybe there's a way to do this that I'm missing. That would be fantastic. But from what I keep seeing, the only way for now is to duplicate data and either refresh regulalrly and/or lock down the reference attributes.


    • Edited by Labry Tuesday, September 24, 2013 4:05 PM disambiguation
    Tuesday, September 24, 2013 4:03 PM
  • In the UI a user can always navigate from a Pricing entity to its related Product entity, or you could provide a custom UI that did this.

    Also you can use business rules to copy attributes down to related entities, but that's probably no better a solution than using a job and the staging tables.

    But other than that, you're not missing anything.  There's no way in the built-in UI to include attributes from related entities.

    David


    David http://blogs.msdn.com/b/dbrowne/

    Tuesday, September 24, 2013 5:15 PM