Posts

Showing posts with the label DefaultSiteCollectionTermStore

SharePoint DefaultSiteCollectionTermStore is null

Image
Hi, In my previous blog( Add Metadata Taxonomy Custom Field using Visual Studio ), I have explained how we can add custom metadata taxonomy custom field. In the feature code we have to write code to bind the field with the taxonomy term set. It can be one business requirement to get the taxonomy session for the current site. We all know there is a dll provided by Microsoft named "Microsoft.SharePoint.Taxonomy" found under ISAP folder. Using this Dll we can get access to current metadata service and default metadata term store by using the following code: var session = new TaxonomySession(<object of SPSite>); var termStore = session.DefaultSiteCollectionTermStore; I just used this code but unfortunately this object returns me null :). Then after spending few hours I found that there is a configuration which allow us to behave term store as default term store. Follow the below steps to resolve this: 1) Navigate to "Central Administrator > Application Management...