Tag Archives: missing data

USD: Missing records when importing with the CRM Configuration Migration tool? Read on!

Microsoft has included as part of the CRM 2015 SDK an application called the Configuration Migration tool. You can find a detailed explanation of how it works in Jukka Niiranen’s fantastic CRM blog.

If you scroll down that article to the subtitle Reviewing the results, you’ll notice that he found some issues initially with the resulting data set. Turns out that the tool uses the Name field as the primary key and unique identifier. With the Unified Service Desk, this will give you a nice, heavy headache when you try to migrate your configuration between development, test, and production environments. Why?

Specifically, two USD entities are the culprits: The UII Action and the Event. These entities repeat the same names by default: PopupRouted, PageLoadComplete, RunXrmCommand, and so on. When you run the Configuration Migration tool with the default settings, you will only get one of each type of entity record. That means only one PopupRouted event, only one RunXrmCommand UII Action…you get the idea.

The solution for this is to make sure that you specify different default fields for identifying unique records for these entities. To enter these specifications, bring up the CRM Configuration Migration tool (found in the SDK Tools folder), and after you connect to your organization and select the USD solution and its entities, select the following item from the top menu.

usd_configure_import

Here you will see a list of the entities you’ve already selected for the schema. In my case, I only selected the two I need for this example. Stay tuned for the solution to our problem!

Event

To correct the issue with events, we have two choices in our unique record selection. We can either do it by Id…

usd_configure_event_id

Or, we can do it by field selection. In the case of Events, we have two fields that uniquely identify each record: Name and Hosted Application.

usd_configure_event_nameAnd that’s all you need! This will bring in each and every record for the Event entity. The difference between these two approaches is that doing it by field value will definitely prevent you from accidentally having records with duplicate values. This applies mostly to development environments where you might be mixing data from other developer machines. But if you have a Master Schema with your current last-deployed work (you do have, don’t you?), then you can be okay with just using the record id.

UII Action

For UII Action, the fix is basically the same as with Event. You can either use the Id…

usd_configure_action_idOr you can use the Hosted Application and Name combination.

usd_configure_action_nameAnd the difference with both approaches is exactly the same as with the Event entity.

Now you will be able to bring in all your USD configuration information painlessly throughout your environments. The Configuration Migration tool is a pretty useful application, and I suggest you take advantage of how easy it is to create export/import schemas and datasets for all your environments, although as they mention, this is more intended for the stuff you have in relation to application configuration and such, and not for user data.

Have fun!

Advertisements
Tagged , , , , , , ,