Occasional rantings about Dynamics CRM/365, Power BI, SharePoint, Office 365 and Azure cloud. Intrigued about how people collaborate and data driven decision making. Taking the first small steps in machine learning. Putting all of the above in practical use to help companies "embrace" their customers

Wednesday, April 02, 2014

Managed metadata – lookup terms using custom properties in CSOM

SharePoint Server 2013 introduces the notion of custom properties on specific terms in managed metadata termset and with the added support for .NET client object model (CSOM) for managed metadata APIs you have some quite interesting scenarios that you can imagine (Check out managed metadata and navigation in SharePoint Server 2013)

A typical scenario is one in which you have a master system for which you want to export some parts to a termset in the managed metadata store. To make this to happen you will however need a key from the master system to be linked to the different terms that you are creating. Listed below is some sample code to look for a specific term based on a custom property.