I'm trying to create a custom field type in SharePoint 2007, and the steps I did as below:

i) Create a Class Library project in Visual Studio. The code:

public class CustomField : SPFieldText
    public CustomField(SPFieldCollection fields, string fName)
        : base(fields, fName)

    public CustomField(SPFieldCollection fields, string tName, string dName)
        : base(fields, tName, dName)

    public override string DefaultValue
            return "XXX";

    public override string  GetValidatedString(object value)
        return value.ToString().ToUpper();

ii) registered the project as strong key name
iii) build project, then drag and drop the dll into GAC
iv) create a XML file, the code:

    <Field Name="TypeName">CustomField</Field>
    <Field Name="ParentType">Text</Field>
    <Field Name="TypeDisplayName">Custom Field</Field>
    <Field Name="TypeShortDescription">My Custom Field</Field>
    <Field Name="UserCreatable">TRUE</Field>
    <Field Name="FieldTypeClass">ProjectName, CustomField, Version=, Culture=neutral, PublicKeyToken=XXXPUBLICKEYXXX</Field>

v) do iisreset

then I go to SharePoint create a Site Column, I don't see the custom field type I deployed, am I missing any step?

1 Answer 1


I'd recommend you to use WSP Builder item template for creating Custom Field Types. Just add a project item, and all necessary files will be created automatically.

If you don't want to use WSP Builder, please consider these points:

  1. XML files for custom field types should be named as "fldtypes_YourFieldName" and placed into TEMPLATE\XML folder.
  2. Looks like you need to swap ProjectName and CustomField in your FieldTypeClass property, to make it look like this:

    <Field Name="FieldTypeClass">MyProject.MyFieldTypeClass, MyProject, Version=, Culture=neutral, PublicKeyToken=XXXPublicKeyTokenXXX</Field>

  3. Usually you should provide also FieldControl and field editor control classes

Also, have a look at following MSDN article:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.