Sometimes you can have moments of anguish fun trying to figure out a particular issue involving Microsoft Dataverse solutions and why specific components may not be transporting across into other environments as expected. A great example of this came up for us recently on a project, which I thought I’d share as part of today’s blog post. Let’s assume we have a scenario that looks a little like this:
- Within our Dataverse environment, we have two tables - in this case, One Table and Many Table:
- Both of these tables have an identical set of columns defined for them, a relationship between them both (1:N between the One Table and Many Table - hence the names 😉) and the appropriate column mappings defined:
- For this example, we’ve included the full definition of the Many Table table, but nothing for the One Table**.** For the purposes of this scenario, let’s assume that the table/columns our relationship references are within another solution, or we’re working with some unmodified, out of the box components that we don’t want to transport.
With the scenario defined, we can now jump into the problem - namely, that none of the column mappings we’ve defined with our relationship will export correctly. We can verify this by checking the raw customizations.xml file, which confirms that our relationship definition (EntityRelationship) has exported correctly but has wholly excluded the mappings (EntityMaps) we’ve defined:
The solution is remarkably straightforward and, perhaps, obvious - add in the table and all columns defined as part of the mapping. After doing this and exporting the solution again, we can then verify that the EntityMap node now contains the mappings we expect:
From there, you should then see your defined column mappings getting deployed out successfully into other environments. 😀
Problems of this nature tend to have a straightforward answer but can sometimes be quite tricky to diagnose as they occur in the moment. Hopefully, if you’ve stumbled upon this post after coming across the same issue, you’ll know what you need to do now to get things working as they should be.