Search This Blog

Wednesday, 23 May 2012

Get SharePoint Feature Name from Feature ID

I have got an error when import web in SharePoint 2010.

It shows a Feature id and says that the feature is Site-scoped and  can not be added to the web.

Its difficult to identity feature in this manner, since it just shows the feature id. There are chance  to have more number of feature in SharePoint farm, Here i have discussed two approaches for identifying feature from the feature id.

Find Feature name by feature id

Approach 1:
 
We can check this with the Feature.xml file, which is available under
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\HFEventReceivers_Feature1

But this is not a easy way, if we have more number of feature.

I have found another solution for this, we can identify this through SharePoint Object Model

Code snippet

Now we can get the feature name for the feature id, which we have give as input.

Cool .................................................
Happy Programming








No comments:

Post a Comment