Mapping priority in ER

In ER, there may be multiple mappings for a single model. This is because there could be different ways of filling it. In this post, I’m going to explain how the system knows which one to run.

Let’s start with this example of an export message. We have a model, three mappings, and a format. The model has only one field, and each mapping is giving a different value to that field (Map1, Map2, and Map3):

If I try to run the format, I get:

More than one model mapping exists for the ‘TST_mapPriority_MOD (Root)’ data model in the configurations TST_mapPriority_1_MAP, TST_mapPriority_2_MAP, TST_mapPriority_3_MAP. Set one of the configurations as default.

Default

Basically, we need to select the default mapping:

And now, when running the format:

If we have a couple of defaults, we would get also an error:

More than one default model mapping exists for the ‘TST_mapPriority_MOD (Root)’ data model in the configurations TST_mapPriority_2_MAP, TST_mapPriority_3_MAP.

Country

This is only available for those mappings we can modify (our configuration provider), so we cannot change the country of Microsoft ER configurations, and we shouldn’t change the configurations of third parties.

So, let’s say we have the following configuration:

Mapping 1ES
Mapping 2US
Mapping 3IN

On executing the ER from an American legal entity, we would get MAP2. Switching to a Spanish legal entity, we would get MAP1.

Now let’s try the same from the American legal entity with:

Mapping 1ES
Mapping 2US
Mapping 3

We’ll still get MAP2 because, even though both Mapping 2 and Mapping 3 are available in this legal entity, Mapping 2 has priority since the country is selected.

Mapping 1ES
Mapping 2US
Mapping 3Default

Now, we would get MAP3, because it’s marked as default.

With the following configuration we would get MAP2:

Mapping 1ESDefault
Mapping 2US
Mapping 3

Is Deleted

A mapping configuration (node) can have multiple mappings. We may want to run a mapping from one configuration and another from a different configuration, for example, when we extend a mapping from Microsoft. For this, we have the “Is deleted” check inside the mapping configuration:

While we don’t need to complete the mapping for it to work, we can only mark the check for our own (configuration provider) mappings, not third parties. When a mapping configuration is deleted, it will be ignored by the system.

In this example, we would get MAP3:

Mapping 1ES
Mapping 2USDeleted
Mapping 3

In practice, we would use this “is deleted” field if, for example, we extend a standard Microsoft mapping configuration and we want the system to use one of the mappings from Microsoft’s node and another from our extended configuration, but without actually deleting it:


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *