Help understanding entity relations and mapping...i.e. why isn't my mapping working? RRS feed

  • Question

  • CRM 2013 On Premise


    Pretty straight forward question here.

    Product Entity

    Custom Entity.

    The custom entity is associated to one or more products but usually one. I created a relationship between product and custom entity. This is all working nicely.

    Now on the custom entity when a user selects a product the product name is displayed. In our situation we also need the user to be able to see the product ID...which is really the productnumber field...a single text 100 chars.

    Now I thought that was one of the things that mapping fields in your relationship definition would do?? So I opened the relationship added the mapping, save...publish....it no worky...huh? Maybe I don't understand the mappings.

    So I googled and came across articles like this  that lead me back to my original postulate that adding mappings in your relationship definitions would == relevant values being brought over and stuck in the mapped destination field?

    Now solving the problem is easy enough. I can write jquery to call Odata and lookup the productnumber for the onchange event.

    My question is what am I misunderstanding about field mappings?

    Thank You

    • Edited by zzpluralza Friday, March 21, 2014 4:55 PM
    Friday, March 21, 2014 4:53 PM


  • Field mappings only apply when you create the child record from the context of the parent. For example, opening the Product and creating your custom entity record from the associated grid. If you create a new child record outside the context of the parent, and then set the Product lookup, the mappings are not applied.

    However, since you said the custom entity can be related to more than 1 product, you would probably want to use a N:N relationship instead of a 1:N. That way you can have 1 or more products linked to your custom entity, and then you can display the product number in the associated view on the custom entity.

    Hope that helps


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    • Proposed as answer by Paul Nieuwelaar Friday, March 21, 2014 11:17 PM
    • Marked as answer by zzpluralza Friday, March 21, 2014 11:51 PM
    Friday, March 21, 2014 11:15 PM