Skip to main content

Weblog Ton Stegeman [MVP]

Go Search
Home
  

ODC 2008
If you have a question or suggestion, please contact me through Windows Live Messenger.
My status: .

If I am not online, please send me an e-mail.
Weblog Ton Stegeman [MVP] > Posts > SharePoint Objects – Insight in usage of your SharePoint artifacts
SharePoint Objects – Insight in usage of your SharePoint artifacts

Introduction

[Update 28-02-2010]: Watch the introduction screencast at vimeo.

This blog post is the introduction of my new CodePlex project, SharePoint Objects. SharePoint Objects is built to give you insight in usage of SharePoint 2007 artifacts in your farm. You probably have seen the message “The content type is in use” a number of times when you tried to delete a content type. Then the big search for all other content types, lists and items that are using the content type began and probably ended in frustration. Or you are going to make a change to one of the site columns and you want to understand the impact of this change. The only way to do this in SharePoint is by manually going through all your sites and lists.

This is where SharePoint Objects is going to help you. It creates a dedicated database in your farm. You can instruct SharePoint Objects to index specific objects and all references to that object into the database. You can use the SharePoint Objects pages to display the information in this database. This will help you to quickly find all places in SharePoint 2007 where your artifact is used. The solution comes with a timer job that automatically keeps this information up to date, based on the schedule that you specify. The screenshot below shows the overview of the usage of the out of the box “Article Date” field.

image

It shows three different types of objects that are using the site column in the site collection. The list shows the name of the referencing object, including a link to the details page of that referencing object. It also shows the site and the list that contain the object. You can filter the list by using the search options just above the list, or by using column filtering just as in ordinary SharePoint lists.

The release that I am now introducing is the first beta release. This version indexes site columns and content types. For content types these types of object references are indexed:

  • Content type associated to a list: SharePoint lists that are using the selected content type.
  • Content type of a list item: List items of the selected content type.
  • Content type is parent of a content type: Other content types that are using the selected content type as parent.

For site columns these types of usage of the site column are indexed:

  • Site column associated to a list: SharePoint lists that have the selected field associated.
  • Site column used by a list item: list items that have a value for the selected field.
  • Site column associated to a content type: Content types that have an association with the Article Date field.

At the bottom of this post, you will find my ideas about the future of SharePoint Objects. After installation of SharePoint Objects (you can download installer and the installation guide here) you need to specify which objects will be indexed by SharePoint Objects.

Specifying objects to index

After installing the solution, you need to tell SharePoint Objects which objects to index. Before you do this, make sure you completed all configuration steps that are described in the Installation Guide. In these steps you will setup the database and configure menu options and the timer job. The site settings menu of all SharePoint sites now have a new section called SharePoint Objects. The page that you select will show you all objects that are defined in that site. Please be aware that it only shows the objects that are defined in the current site. It will not show all available site columns or content types. Therefore the list of objects will be long in the root site of your site collections. In the sample screenshots below, I am using an example of a site column, but the same principles apply to content types.

The left side of the screen shows information about the current site. It shows when the site was last indexed. Just below that you will find the section that shows all artifacts, defined in this site, that are currently monitored by SharePoint objects. In my case, this list is empty, because we are going to configure the first object. Use the group dropdown or the search box to find your site column and click the radiobutton.

image

The top right of your screen will now show the options for the site column. First you need to select the Index scope. You can choose from one of these 4 scopes:

  • Site – Just objects in the current site are indexed.
  • Site Collection – The indexer will iterate through all sites in the current site collection to find objects that use the site column.
  • Web Application – All site collections in the current web application will be monitored for references to the Article Date site column.
  • Farm – All artifacts in all web applications in your farm are checked for references to the selected site column.

image

The second option is to select Index by property. The indexer uses this value to decide if a SharePoint artifact has a reference to the selected site column. The dropdown has these options:

  • Id – Checks the reference of for example a site column association to a list based on the ID (the GUID) of the site column. If the GUID of the Article Date field matches the guid of any of the list fields, the list is included in the index. This is a useful option for the out of the box site columns and the site columns that you have deployed through features, in which you specified the ID for a field.
  • Display name – If you manually created the same site columns across multiple site collections and web applications, the ID for these site columns will be different. You can then instruct the indexer to decide whether or not it is a reference by looking at the display name of the field. In my example, a
  • Internal name – Same as display name, but now the internal name of the field is used. If you promote your users to categorize their documents using a Category field, you can use SharePoint Objects to get an idea of user groups in your organization that are using this.

If you want to index the selected site column, you check the box Include in index. If you want SharePoint Objects to include references to list items in the index, you tick the Index list items box. If this is not selected, list items in the lists and libraries are not checked for references.

After setting the options, click the Save button. You can now wait for the timer job to kick in and index the objects you configured, or you can click the “Index now” link in the Site information section.

Finding references to your object

After setting up a number of objects and running the timer job, you can use the SharePoint Objects pages to find the references. You use the same page as you used to setup your artifacts in the previous chapter. The Indexed Site columns section now shows the objects that are monitored by the solution.

image

Select one of the site colums. The right side of the screen now again shows the options you just set for this object. Below that you will find the list of objects that have a reference to the Article Date field. You can use the dropdown boxes and the textboxes in the Objects using this site column section to find the references that you are looking for.

image

Please notice the 2 scope dropdowns in the screenshot above. The display scope is set to Site. So the list currently only shows all artifacts that use Article Date in the current site. The references are indexed using the web application scope, so I can change the dropdown and get an overview of all objects using Article Date, even in other site collections. If I had set the Index scope option to Site Collection however, the indexer just looked in the current site collection and selecting Web Application as the display scope would not show me more references. Just because they are not indexed.

You can also filter the list by using the column headers:

image

Running SharePoint Objects in your farm(s)

There are 2 ways to run the SharePoint Indexer. The first option is to configure the timerjob and specify a schedule. Please be aware that indexing is a process that uses a lot of system resources and is something that you would not want to do during business hours. In your Central Administration, the Application Management page has 2 new menu options:

image

Select the option Configure timerjob for the index job of SharePoint Objects. If you do not see these options, the web application feature is not activated for your web application. Check the Installation Guide for instructions. Specify a schedule for the timerjob and click OK.

image

Please note: the indexer runs in the context of a web application. That means that if you want to index content from multiple web applications, you need to activate the feature and configure the timerjob for every web application.

The future

As I said in the introduction, this is the first beta release. I hope you are going to give it a go, but please give it a pretty good test in a lab environment, before throwing it on the production server directly. I am interested to hear feedback from you how installation and configuration was. You are also invited to give me suggestions on how to improve SharePoint Objects. Am I missing references for site columns and content types, does everything work as expected, are all links shown in the overview correct? Things like that. I am also working on new artifacts to include in a next release. The list can get pretty long, I am currently thinking about:

  • SharePoint groups
  • Web parts
  • Feature Definitions
  • Page Layouts and master pages
  • List schema’s
  • List views

If you have artifacts that you want to index in the next release, please let me know and I will prioritize.

Here is the link to CodePlex: http://sharepointobjects.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=38702

Enjoy SharePoint Objects and hope you like it!

Comments

There are no comments yet for this post.
Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Your city *


Type the name of the city you live in (making it easier to handle spam...)

CurrentDate *

Select the current date (see if this gives me fewer spam...)
Attachments

 Links

  SharePoint Object on CodePlex
  Screencast introducing SharePoint Objects
  Content by Type and Filter Web Parts on CodePlex
  Archive
  Archive (Calendar)

 My Latest Blog Posts

Scripting SharePoint 2007 setup: choices and conceptsUse SHIFT+ENTER to open the menu (new window).
Adventures in Visual Studio 2010: Migrate the Content By Type web part to SharePoint 2010Use SHIFT+ENTER to open the menu (new window).
Register SharePoint themes by using a featureUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010 development on Windows 2008 Server R2 – Getting StartedUse SHIFT+ENTER to open the menu (new window).
New release SharePoint Objects: features and groupsUse SHIFT+ENTER to open the menu (new window).
Constructing the url to the SharePoint Edit Permissions pageUse SHIFT+ENTER to open the menu (new window).
Screencast: introduction to SharePoint ObjectsUse SHIFT+ENTER to open the menu (new window).
SharePoint 2007 and Reporting ServicesUse SHIFT+ENTER to open the menu (new window).
SharePoint Objects – Insight in usage of your SharePoint artifactsUse SHIFT+ENTER to open the menu (new window).
SharePoint 2007 Custom list schema and the Content Query Web PartUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010 Silverlight Client Object Model – ExecuteQuery vs ExecuteQueryAsyncUse SHIFT+ENTER to open the menu (new window).
SharePoint 2010, the Client Object Models and Bing MapsUse SHIFT+ENTER to open the menu (new window).
Having fun with SharePoint 2010, Silverlight 3 and Bing MapsUse SHIFT+ENTER to open the menu (new window).
Connecting TFS 2010 projects to SharePoint sitesUse SHIFT+ENTER to open the menu (new window).
Adding a database to the SharePoint database Server using SPDatabaseUse SHIFT+ENTER to open the menu (new window).