This project is read-only.

Refer the Home page for Project Description, which outlines the details of this tool. Here, I will talk about the technical / usage details of the project. This tool is built using CSOM (.Net and not JS) and the Taxonomy Client Service (Native WS provided by SP 2010). Since its a client based utility, it can be run from any Windows machine (which has .Net 3.5 or higher). It exposes a config file which captures the following details, as key value pair.
Key: SITE_URL . For this, enter a valid site URL, where the taxonomy columns are part of. Also, ensure, you have access to the site.
Key: COLUMN_GROUP_NAME. For this, the value will be the name of the column group, to which the taxonomy columns belong. If this is not correct, the results may not be as expected.
Key: HIERARCHY_NEEDED: For this, the value has to be either a TRUE or FALSE.
Key: TERMS_XML_FILE_NAME. For this, the value has to be name of the XML file to be generated as output.

These are the 4 inputs needed before running the utility. The utility just has 2 DLLs (Microsoft.SharePoint.Client.dll and Microsoft.SharePoint.Client.Runtime.dll) and then the exe and a config file.

As soon as you launch the exe, it will prompt you for a user name, then Password (don't worry, it is masked) and then the domain name (press Enter, after you enter each detail). As soon as you are done entering the domain and hit enter key, a message saying "Term Set Xml Generation Started.." shows on the console. Please wait until the utility completes execution, which will be confirmed by the message "Term Set Xml Generation Completed Successfully.." on the console. That is it. The output XML will also be generated in the same location as the executable.

Note: Since this utility can be run from any local Windows machine, make sure, you are connected to the network of the application, whose taxonomy, you are trying to export. Also, this only gives the term sets and the terms ( and their children) within them and not the term group. But as mentioned earlier, the code can be customized to suit your needs.

Also, this utility relies / reads the Term Store Id from the fields' (taxonomy) schema and it builds the term sets based on that information. Hence it assumes, all the taxonomy fields involved in the site belong to the same term store, which will ensure integrity, while recreating the term sets into a term group in any other environment.

I have also provided a Power Shell Script (CreateTaxonomyTermSets.ps1) to recreate the Term Sets on another environment, using the XML generated from the above utility. We cannot recreate the term sets using CSOM / Web Services, since methods are not exposed in SP 2010, though this has been addressed. in SP 2013. In the Powershell script, you can either open the file and enter the values of the parameters in the Param section (assuming you know Powershell) or you can supply those arguments while invoking the powershell. In case, if you don't provide the arguments while invoking the script, it is better to update them in the file, since there are no values for these in the file currently and the script will fail if it's not provided with these values.

Last edited Aug 29, 2013 at 2:35 AM by venh123, version 3


No comments yet.