Recently, I had to figure out that if SQL Server 2016 can be used for SharePoint 2013. Now, version compatibility is a must. Initially, I did assumed that since, SharePoint 2013 works pretty well with SQL Server 2012, it should work with the higher version of SQL Server as well. However, that’s not the case.
Read More »
Tag: SharePoint 2013
Office Developer Tools for Visual Studio 2012
I needed to create a SharePoint 2013 Visual WebPart in Visual Studio 2012. This is the template, I was getting by default:
Backup and Restore SharePoint SiteCollection
The scenario here was to deploy an existing SharePoint SiteCollection to a different url within the same farm. Now, there might be different approaches towards achieving it. I’ll be doing it by the following way:
- Take the backup of the given SiteCollection.
- Restore the same db to a different url.
Import SharePoint MetaData from CSV along with their Guids, Deprecate-State and Custom Ordering
This is the final of the two-series blog. Before proceeding further, here’s the link to the 1st part, https://realmpksharepoint.wordpress.com/2015/06/19/export-sharepoint-metadata-to-csv-along-with-their-guids/. The objectivity of the entire series has been already defined there so I won’t be re-iterating the same. However, I must re-visit some of the items relevant to the current context. So following are the objectives of this script:
- Import Terms to SharePoint only when they don’t already exist. The search will be done using the Term Name only.
- Can create a Term with the given Guid i.e., Guids can be retained across the servers. This is optional. If you don’t want to use this option, then keep this column blank and the TermSet will be created using a brand new Guid assigned by the SP.
- Deprecate/Un-Deprecate an existing or a new Term. If you want to change this option on a number of pre-existing TermSets or you even want to create the TermSets with the deprecate value on, then simply update the corresponding column in the exported CSV and then run the import script.
- Modify the availability for Tagging option. If you have to change this option on a number of pre-existing or new TermSets then simply update the given CSV accordingly and then run the import script.
- Most importantly, it applies custom sorting to the TermSets. So the TermSet and their child terms will exactly appear in the same order as has been listed in the processing CSV file.
Input
There are three parameters that needs to be set before executing the script. They are:
- $fileName: Full path of the csv file to be imported.
- $termStoreGroupName: Term group name. Please note that the script does not create a term group. Hence do ensure first that the group already exist at SharePoint even if its blank.
- $MMSStore: Name of the managed metadata service.
Export SharePoint MetaData to CSV along with their Guids
This is a two series blog in which I will try to cover lots of SharePoint TermSet Metadata operations. The idea is to achieve the following:
Export Terms to CSV
- Existing Terms along with their child Terms,
- Current Guid,
- Available for Tagging option, &
- Deprecate state.
Import Terms from CSV
- Import Terms which will create Terms only when they don’t already exist. The search will be done using the Term Name.
- Can create the Term with the given Guid. This is optional. If you don’t want to use this option, then keep this column blank and the Term will be created using a brand new Guid.
- Deprecate/Un-Deprecate an existing or a new Term. If you have to change this option on a number of pre-existing TermSets then simply update the exported CSV accordingly and then run the import script.
- Modify the availability for Tagging option. If you have to change this option on a number of pre-existing TermSets then simply update the given CSV accordingly and then run the import script.
- Most importantly, it also applies custom sorting. So the Terms and their child terms will exactly appear in the same order as has been mentioned in the processing CSV.
In this post, I’ll only be showing the export operation. The import operation has been defined here, https://realmpksharepoint.wordpress.com/2015/09/23/import-sharepoint-metadata-from-csv-along-with-their-guids-deprecate-state-and-custom-ordering/. Please note that since the generated output will be in CSV format, we’re converting any comma (,) that might be included in the Term name to “,” otherwise the format will get distorted.
Input
The script expects two parameters that needs to be set before executing it. They are:
- $termGrpNm: The name of the TermGroup whose all TermSets will be exported to CSV files respectively.
- $svLoc: File System location where all the CSVs will be dumped.
Here’s the script preview. Download link for the same has been provided in the later segment.