How I got it working...

Feb 20, 2013 at 2:59 PM
Edited Feb 20, 2013 at 3:00 PM
I finally got this tool working for me, but thought I should share the steps I had to go through as it didn't work straight away, but now it is working it's a real time-saver.

1.) Installing the solution did not alter the site map, so I had to add the solution web resource to the site map. I did this using the Site Map Editor (http://sitemapeditor.codeplex.com/). Every developer should be using this tool! To add the web resource, open the tool, create a new SubArea where you want it (eg Extensions within workplace) and give it a name (in the ID field), a title and a description and the URL should be $webresource:xrm_NToNImportExport.html

2.) When you click the new entry in the sitemap, it may take a while for the list of entities to load. For me it takes about 5 minutes. Be patient. Eventually you will have a list of all entities which have n:N relationships defined.

3.) You should now be able to select the first entity, see a list of relationships to other entities, determine whether you want to link by ID or by a named attribute, select a csv file for import and it should just work. However, for me it did not - I kept getting an error - 'Issues on line 1 - line has 1 instead of 2'.
The problem was not with the content of the file, but with the encoding. What I did to fix this was go to the Export tab and (having made sure that at least one N:N relationship already existed), and exported a file. I then cut and paste my comma seperated values from the other file into this new file and this worked fine. Once the file is uploaded, you see a progress bar and errors for any records which it is not able to map. You can then use the Export tool to verify which records have been created.
I ended up using semi-colons as a seperator - not sure if that was necessary, but that's what the export file has, so I used that.

Thanks again to Andrii for his help,
Ben
Coordinator
Feb 20, 2013 at 3:08 PM
Welcome! Actually I did this tool for one import I had to do for a customer and I don't have a time to support and improve it...

Kind regards,
Andrii.
May 24, 2013 at 5:21 PM
Edited May 29, 2013 at 10:28 AM
Whats the best way to export entities and keep the guid intact in order to then use this tool? Or am i missing a trick - will this tool export the entities with the guids and glue them together in the bridge tables? Edit, got this rolling without any of the problems bhwalker reported. I imported data from one system to another keeping the guids during the import then used this tool to glue them together. Besides buying something like scribe there really isn't a nice way of doing this...