Work with SharePoint Content Types and Site Columns using intellisense - Imtech Fields Explorer v1.4.0.0


An important update to this version has been published. See Imtech Fields Explorer v1.4.1.0 for more details.

Windows SharePoint Services v3 has introduced the concept of Content Types and Site Columns which allows you to separate the definition of the content from the content itself. Furthermore it is possible to reuse these definitions across the whole Site Collection. In many situations you will need either the Internal Name or the ID of the Content Type/Column to obtain its reference. Manually typing these values in your code is prone to type errors which you can see no earlier than during the runtime. To improve the experience of working with the Content Types and Site Columns I have extended the Imtech Fields Explorer with the possibility of creating wrapper classes for both Content Types and Site Columns.

Introducing Imtech Fields Explorer v1.4.0.0

In the previous version of Imtech Fields Explorer I have added the possibility of exporting the Content Types and Site Columns to XML. This allows you to configure the content definition for your solution using the user friendly SharePoint Web UI. While it’s definitely an improvement comparing to the standard way of typing the complete XML, there are still many situations when you have to access Site Columns programmatically.

In order to support that process I have extended the Imtech Fields Explorer with the ability of creating C# classes which contain the Internal Names of Site Columns:

Content Type Wrapper Class generated using Imtech Fields Explorer v1.4.0.0

You can then use that information like:

Using Content Type Wrapper Class while working with List Items

As the class is automatically generated using the information stored in SharePoint, it is up to date and contains the Internal Names of all the Fields within the given container.

Creating Wrapper Classes using Imtech Fields Explorer

Creating wrapper class

Because there are a few various scenario’s when you might want to have a list of the available Fields and their Internal Names I have decided to provide the possibility to create Wrapper Classes on various scopes.

While working with one particular Content Type you would need a class containing all Site Columns within that particular Content Type:

Wrapper Class for one Content Type

While working on a solution you’re very likely to create multiple Content Types. To keep the overview of the custom Content Types you would save them in your own group. To simplify working with Content Types and Site Columns within the whole solution you would create Wrapper Class for each Content Type in the given Content Type Group:

Creating Wrapper Classes for a Content Type Group

Generated Wrapper Classes

In many WSS projects you might work intensively with lists without using Content Types. Imtech Fields Explorer allows you to create a Wrapper Class for a List as well:

Creating a Wrapper Class for a List

Wrapper Class for a List

Eventually there is a possibility of exporting all Site Columns of the given Site Collection to keep an overview of all available Fields.

Summary

Imtech Fields Explorer is a tool that simplifies the process of working with Content Types and Site Columns in WSSv3 and MOSS 2007 solution. In its newest version it supports the process of developing SharePoint solutions by providing Wrapper Classes for Content Types and Site Columns. Imtech Fields Explorer not only simplifies working with content definitions in SharePoint 2007 but also improves the development experience.

Imtech Fields Explorer v1.4.0.0

Download: Imtech Fields Explorer v1.4.0.0 (68KB)

Technorati Tags: SharePoint, SharePoint 2007, MOSS 2007, WSS 3.0, WCM, Tools

Others found also helpful: