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


Share post:

Related posts

How the “Regarding” field works in Microsoft Dynamics 365 CRM and the process for adding a custom entity to the “Regarding” lookup field.

Microsoft Dynamics 365 CRM is a powerful tool that allows you to associate records with other entities through the use of the "Regarding" fiel...

1 month ago

Wardley Mapping - Exploring the Mining Value Chain

The article explores the opportunities that the AI, digital technology and data present for the mining industry using a technique known as War...

4 months ago

Set Field Error Notification using JavaScript by checking related parent entity record info in Dataverse Model driven app power apps

If you're using Dataverse Model driven app power apps and need to validate form fields based on parent record information, this article may be...

9 months ago

Check Parent Entity Name From Child entity form D365 CE

If you are working with Dynamics 365 Customer Engagement and need to validate a child entity form based on the parent entity, this tutorial ca...

1 year ago

3 Limitations of Sales Territory Mapping Without a Mapping Tool

How does your sales team map territories? Most of the organizations don’t have a proper tool to visualize the CRM data on maps. They either fi...

1 year ago

Extend modern commands with custom pages and geospatial mapping

If you're a developer looking to enhance your Power Apps modern commanding capabilities, this tutorial will show you how to leverage geospatia...

1 year ago

Making “Entity Relationship Diagrams (ERD)” easier to understand

In this post, the author explores strategies to help people understand entity relationship diagrams (ERD) more easily. The post begins with a ...

1 year ago

Relationship Mappings: String Length Too Long

Dataverse's relationship mappings are a powerful tool that enables the creation of related records with already pre-filled fields, based on th...

2 years ago

D365 CRM Entity Relationships

In this post, we delve into the different types of entity relationships in Microsoft Dynamics 365 CRM and offer insights into how they work. U...

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