Showing posts with label TermSet. Show all posts
Showing posts with label TermSet. Show all posts

Tuesday, February 21, 2012

SharePoint 2010 User profile service


I was asked multiple times to help locate "User Profile Repository" for SharePoint 2010.

You can follow the steps below to access it. You need access SharePoint 2010 "Central admin site" for this purpose.

Select “SharePoint 2010 Central Administration” from start menu
Select “Application Management“
Select “Manage service applications“
Select “User Profile Service Application”
Select “Manage User Profiles”


Wednesday, December 21, 2011

SharePoint 2010 - why should you consider creating termsets with code


Creating termsets in 2010 is very simple.
Create an csv file with the correct format (Term Set Name,Term Set Description,LCID,Available for Tagging,Term Description,Level 1 Term,Level 2 Term,Level 3 Term,Level 4 Term,Level 5 Term,Level 6 Term,Level 7 Term,GUID)
I really like this new feature and the OOTB control that you can use with termsets.

But if you are not very careful when you use termsets in your project if you are planning to use SharePoint backup/restore as a deployment mechanism. as these termsets are not part of content database, you will need to manually create the termset on the destination server.
Now...the problem is, SharePoint assign a GUID (oooh yes) to each term when you create termsets sing csv file impoerts. When you create the same termsets on your destination server, SharePoint will assign a different set of GUIDs. This means the data won't identify the terms and you need to fix them manually.
the solution is to use code to create termsets and assign GUIDs when you create them. you can use the method below for that.
public TermSet CreateTermSet(string name, Guid newTermSetId, int lcid);
Namespace : Microsoft.SharePoint.Taxonomy
class : Group
Have fun coding...

SharePoint 2010 Managed Metadata Exception


SharePoint 2010 Managed Metadata Exception
if you get the following SharePoint 2010 exception , the probable reasons are
1. You are accessing the managed metadata service with a wrong name.
2. The term group you trying to access don't exist
3. The termset name is wrong.
4. the account you use don't have permissions to access the termset.
System.ArgumentOutOfRangeException was unhandled by user code
Message=Specified argument was out of the range of valid values.
Parameter name: index
Source=Microsoft.SharePoint.Taxonomy
ParamName=index
StackTrace: at Microsoft.SharePoint.Taxonomy.Generic.IndexedCollection`1.get_Item(String index)
Hope this saved you some time