Loading...

Allow Native Mapping When Referencing a Parent Entity

Allow Native Mapping When Referencing a Parent Entity

If you are working with CRM Relationship mapping in Out of Box (OOB) CRM, you may be aware of the limitations of the mapping, which only works when you're creating a child entity from the parent form. However, if mappings are set up from the Product to the Lead Product, and you have an entity that is serving as a M:M entity, then if you create a Lead Product from the Lead Form, the mappings will not be applied.

To get around this issue, you can create a plugin that uses what is defined in the OOB field mapping for the relationship to perform the mapping. The plugin should define the parent field(s) in the plugin step for extensibility. There is a working example of such a plugin provided in this post.

All you need to do is register the plugin for each entity to be initialized, make sure the unsecure configuration settings contain a comma (or pipe or newline) delimited list of parent lookup attributes to initialize the entity from, and then ensure that the parent field lookup field is populated on the initial save. The plugin will only map unpopulated fields; fields with user-defined values will not be overridden.

Once the plugin is set up, your Entity Relations Field Mappings can be used in many more places! Just keep in mind that an end user will not see the mapped values on the form until after the initial save refresh occurs.

Published on:

Learn more
.Net Dust
.Net Dust

NULL

Share post:

Related posts

Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy