SharePoint Connections 2010, Den Haag, 29 September 2010
Session: Incorporating Managed Metadata in Custom Solutions (MDV11)
Speaker: ANDREW CONNELL ( http://www.andrewconnell.com/ )
- Main ideas covered by this session:
- Creating & Importing Taxonomies
- Managed metadata columns
- Programming with the taxonomy Field
- Overcoming Limitations of LINQ to SharePoint
- Taxonomy TERMS scope in SharePoint 2010:
- Global terms are scoped to Service app
- Local terms are scoped to site collection
- Taxonomies are multilingual
- In Managed Metadata Service Application you can import a CSV file
- You might consider having one Service Application per domain (e.g. one for Medical, one for finance, etc))
- You have the possibility to configure the submission of terms to the Service application (‘Closed’ meaning available only for Managers of this service application or ‘Open’ to everybody); nevertheless you can not make usage of a workflow for validation of submitted terms (not out of the box)
- Operations on a TERM in a TERM set:
- Create, copy, reuse (capability of a term of being referenced in more than one term sets but managed in only one), merge, deprecate, move
- The Folksonomy terms are stored in the Managed Metadata Service (MMS) in the System/Keywords terms set
- Metadata Navigation functionality can be activated on every SharePoint List: go to ‘List Settings’
- Automate tagging of content: It is possible to enforce a specific term by default on all items/documents of a storage element like a folder for example (option in the document library)
- Creating & Importing Taxonomies
- From CSV file
- Does not support importing labels (synonyms)
- Full taxonomy API provided: Microsoft.SharePoint.Taxonomy.dll
- Not all customer needs are satisfied by MMS out of the box like for example
- Taxonomy based on external systems
- Inclusion for synonyms and translations
- Options on working with taxonomies from external system:
- Use BCS
- Build something yourself using the API
- Working with taxonomies through the API
- Get a taxonomy session
- Select a term store (MM)
- Check the code for this session for a perfect example (adding and updating new terms via l’API)
- Creating Managed Metadata Columns in a SharePoint list is possible:
- Via Browser or SharePoint Designer
- Declaratively (Feature)
- Programmatically
- You must set the Term Store ID, the Term Set ID
- TermSet.GetTerms() returns a TermSetCollection and has a lots of overloads (LCID, taggable terms, collection size, filter deprecated, terms, etc)
- Tooling: Metalogix (specialized also in migration and considers metadatas)
- LINQ & SharePoint limitations:
- SPMetal.exe’s generated entity model includes only SharePoint Foundation 2010 types – > it does not work with LINQ to update Taxonomy terms
- BUT a solution would be to augment the generated model via ICustomMapping.MapTo() & ICustomMapping.MapFrom() (adds logic to map data in DB to field and vice versa)
Advertisement
[...] Incorporating Managed Metadata in Custom Solutions (MDV11) – my notes [...]