CodePlex- Managed Metadata focused solutions-Part 2

Hello all,

As per the commitment i have made earlier  in my earlier blog CodePlex- Managed Metadata focused solutions-Part 1, this is the part 2 of this series of write ups, CodePlex- Managed Metadata focused solutions.

In this blog i will elaborate the SharePoint 2010 Managed Metadata Importer. It is the simple yet upto the mark kinda command line utility.

The problem statement is simple:

Need a command line tool to add the new terms set in the Group of the Managed Metadata Service.


Solution is the above tool.

As per my requirement i have the Term Group Name RockShare,


I grab term set SVC file  from the previous solution which i have discussed before, you can get it from there, in the source code, or you can get from here, put it in my C drive.

As i run the importer tool, i got command line window, i entered the details as per the requirement (site url, path of CSV file, Managed Metadata Service name, Group Name)

Just after mentioning the Term Group Name and hit the enter key. Its show you the term which are adding in the heiarchial forma. After filling up the command line window altogether in a split of seconds( depends upon your machine performance :)), the command line window will disappear. Just to check what it has done to my Terms Set, well well it populated all the terms mention in the CSV accordingly.



Deep Dive in the Code:

Simple but powerful tool. Full marks to the contributor. If you look into the code, there isn’t  difficult to understand, well commented and nicely elaborated. It will populate the term till 7th level,

If you just look into the Main method, you will understand that how the code is getting the Term Set Group, from the parameters provided. Then picking the Term Set Name, from CSV, creating new term set, and then adding all the term, 2nd level Term.

My advice is to you guys always that do read the code, it will increase your understanding with the system and architecture.

Happy SharePointing 😀



CodePlex- Managed Metadata focused solutions-Part 1

From past some months, I have been wondering that if there any other site from where i can find out the great amount of work done by community in the Code Plex ( .  For all of you guys who don’t know about Code Plex, CodePlex is an open source project hosting website from Microsoft. It allows shared development of open source software.

As i have been working on SharePoint for quite a while now so i guess its a right time to look into these contribution.

All i wanted to blog on each of the modules / pillars of SharePoint to find out that how much work is been done for that particular product on CodePlex. Plus i will elaborate on those solutions which are there solely for that modules / pillars.

Let me start with Managed Metadata, as i have blogged previously, there are tons of resource where you can read in details. In a nutshell, it is central place where you manage tags for the list items.

For preparing this blog i browsed to CodePlex site, and searched with “SharePoint 2010 Managed Metadata”, you will find atleast 27 search results,

To be specific, it is 6-7 solutions which are directly addressing Managed Metadata, let me tell you that i am not degrading other work, but those remain out of scope. Hopefully i will cover those on my other posts.

let discuss them one by one, in this post i will cover only one solution, but i will cover other in my following posts.

Following are the relevant solutions from the Search results on the codeplex.

Let starts with the simple but powerful tool for creating navigation kinda feature for Managed Meta Term. First of all, thumbs up for all of guys who took their time out to make this tool or webpart.

Problem statement.

I have a Document Library (for example, HumanResource) which have the managed metadata field (DocumentType). Let suppose that i have 1000’s of items in that Document Library. Now then if i have to see that how many items attached to particular term.

Is there any way?


Yeah. You can use this webpart to show that how many items is linked to term, and it shows in the proper term kinda structure navigation. Just deploy the solution and follow the instruction given on the site, you will have this kinda navigation. You can alter the look by writing you own xsl for this webpart.

Deep Dive in the Code:

The best part with open source, yes you have the code. If you look into this webpart code, you can easily identify how it is using the API to find out the managed metadata field and its number of occurrence.

If you really learn and play around with this code, click here to browse the code.

Hopefully i will try to write some code, to get the this kind of navigation for all of the lists available in the SharePoint site. Wish me good luck.

Will evaluate other solutions in my next blogs.

Till then Happy winter and Happy SharePointing.

Unable to attach List with ListItem event recievers in SharePoint 2007

Whats wrong with me, now we are close to New Year eve of 2012, and Yeah SharePoint 2010 is out in the market since 1 year and half. And today i faced a scenario, which i had gone through repeatedly during 2007-2009. I have written a event receivers for my list items in SharePoint 2007 ( Item added, Item adding,etc) for one reason or the other, My List not able to bind itself to these event receivers. So what is the solution. I know that many of you already know the solution i am going to provide. But for you who don’t know, there is utility available at codeplex as SharePoint Tips Utility Pack ( Contributed by Ishai Sagi.

This utility do many wonders, as you can see from the description from the codeplex link. This guy is really a genuis, to come up with this kind of util is brilliant. Hats Off to you mate.

Bye Bye to Twin Technologies(Maventor), Welcome by KalSoft

I have been off for a while from my blog, due to my job switch from Twin Technologies (Maventor) to Kalsoft as Senior SharePoint Consultant. The last month (mid Oct-Mid Nov) was very hectic for me.

If i just stand up and look down behind the road for my time in maventor, here are some top gains.

  • My time with Maventor went very well.
  • Got the chance to work in close collaboration with one of the fewest MCM in SharePoint 2007- Rai Umair ( And WOW he is an excellent guy, workholic, 24/7 SharePointer.
  • Worked on the amazing project named as Food Connection Pakistan ( On very first look on this you wont able to find out that this site is actually based on SharePoint 2010.

Further more, during this period, i have managed to collaborate with SharePoint community outside Pakistan and Inside as well.

  • Under the influence of my friends, ex-colleagues, User Group fellows, my elder bro Aamir Majeed Khan, and Rai Umair. I took part in two SharePoint Saturday event, SharePoint Saturday Srilanka and SharePoint Saturday Dubai. You can check out the details for these events from my previous posts.
  • For my User Group Events, I managed to bring MVPS, SharePoint gurus, trend setter on my User Group platform and speak to our audience, It wont be possible to mention all the names, but just for reference following are few of them ( Saif Ullah Shafiq (MVP), Jerry Yasir (MVP), Mark Miller, Rai Umair (MCM), Muhammad Atif Hussain (MCT))
  • Almost 10 User Group events till now, 7 session in different univeristies / institutes (MAJU, PAF-KIET,APTECH,TECHNO-ED) and software houses(EbizSoft) in Karachi on the behalf of Microsoft Innovation Center (MIC Karachi).

But certainly i couldn’t able to manage my time from the last month, as i got extra responsibilities on my current project.

Currently i am deployed in Abu Dhabi on a government project ( i wont let you know the government entity for which i am doing this project :P).

I will try my best to populate my blog with interesting post. So hopefully next time you are around here, will definitely see some new and interesting post.

Cheers and keep SharePointing.

SharePoint Techies User Group- OCT 2011 event

Last week i was quite busy with the User Group event preparation.Couldn’t get any time to update my blog. Any way the yesterday event went great. We have 3 session in it.

Some comments from the User

you can download or view my presentation below

Happy SharePointing 🙂

How to find the Listitem metadata info Client Object Model

Yesterday, some one on my last blog   Two ways to Upload file from Client Object Model , asked how to find out the metadata info of the file from COM.

So the following code  give you the general idea how to find out that metadata info of the file from Client Object Model

ClientContext cc = new ClientContext("http://server:5421");
Web web = cc.Web;
string webName = web.Title;
string uploadLocation = string.Empty;

List list = cc.Web.Lists.GetByTitle("Documents");
ListItem item;

// this is how you can get the item(file), you can also use CAML query
cc.Load(item = list.GetItemById(22));

//here you can get the dictonary for fieldvalue

string createdby = item.FieldValuesAsText["Created_x0020_By"];
string modifiedby = item.FieldValuesAsText["Modified_x0020_By"];

Enjoy 🙂

Happy SharePointing 🙂