Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Field Type

SharePoint 2007

Represents an extensible common data structure in SharePoint Products and Technologies for use in lists or other objects that can use SPField objects.

Real World Example

Your organization needs a complex structure to hold shipping addresses in a SharePoint environment that is available globally. A developer creates a field type that contains the structure and displays information for shipping addresses.

Technical Details

Custom field types are defined by .xml files that follow the naming convention fldtypes_XYZ.xml, where XYZ is the name of the field type. The .xml file describes the field type and refers to the class or assembly that contains the SPField object implementation for the field type.

Following is an example from the fldtypes_TargetTo.xml file:

      <Field Name="TypeName">TargetTo</Field>
      <Field Name="ParentType">Note</Field>
      <Field Name="TypeDisplayName">$Resources:spscore,FieldTypes_Audience_DisplayName;</Field>
      <Field Name="TypeShortDescription">$Resources:spscore,FieldTypes_Audience_ShortDescription;</Field>
      <Field Name="UserCreatable">FALSE</Field>
      <Field Name="FieldTypeClass">Microsoft.Office.Server.WebControls.FieldTypes.SPFieldTargetTo, Microsoft.Office.Server, Version=, Culture=neutral,PublicKeyToken=71e9bce111e9429c</Field>
      <Field Name="ShowOnSurveyCreate">FALSE</Field>
            <Field Name="AllowGlobalAudience" DisplayName="$Resources:spscore,FieldTypes_Audience_AllowGlobalAudience;" Type="Boolean"> 
            <Field Name="AllowDL" DisplayName="$Resources:spscore,FieldTypes_Audience_AllowDistributionList;" Type="Boolean"> 
            <Field Name="AllowSPGroup" DisplayName="$Resources:spscore,FieldTypes_Audience_AllowSharepointGroup;" Type="Boolean">
      <RenderPattern Name="DisplayPattern">
            <Case Value="">$Resources:spscore,FieldTypes_Audience_NotTargeted;</Case>
            <Case Value=";;;;">$Resources:spscore,FieldTypes_Audience_NotTargeted;</Case>

Support Details

The field type’s class must inherit from one of the base field types in Windows SharePoint Services, and must be compiled into a strong-named assembly that is deployed to the global assembly cache. Because of this, you should carefully examine the assembly for security or performance issues.

Community Additions

© 2015 Microsoft