SharePoint 2010 I like custom fieldtypes

It doesn’t matter if you are using a standard list or create a new list in SharePoint 2010 – you always make use of field types when you create your needed columns. Each column based on a field type. There are several field types available out-of-the-box. So you can use it for Columns from type text, number, multitext, choice, lookups, etc. But what if you are not happy with the available field types? Well, it’s SharePoint. Just create your own custom fieldtype – that’s easier said than done! But it’s possible.

What is necessary to create a custom fieldtype?

  1. Fieldtype Definition (XML File)
  2. Field Class (.cs File)
  3. Field Control Class (.cs File)
  4. [Optional] Custom XSLT Rendering listview
  5. [Optional] Rendering Template for Display, New and Edit form.

As you can see, a custom fieldtype is build by several files, which also has to be deployed into different folders of the 14 hive.

My custom fieldtype is for hyperlinks. I know there is already a fieldtype for hyperlinks and images. But there is no hyperlink fieldtype for opening hyperlinks in a new window. So I created a hyperlink fieldtype which does exactly this but also gives the user a choice how to open the hyperlink.

How to create a custom fieldtype

My posts about custom fieldtypes:

I put some more examples and good links below.

Resources

Developing a SharePoint custom field type for displaying CRM 4.0 data

How to: Create a Custom Field Type

Walkthrough: Creating a Custom Field Type

Available Field Types in SharePoint 2010

Creating a Custom Field Type for SharePoint 2010 (Email Validation Field)

Walkthrough: Custom field type for uploading and displaying images in SharePoint 2010 lists

As you can see there so many options to use custom fieldtypes, that you should like them.

..:: I LIKE SHAREPOINT ::..

The article or information provided here represents completely my own personal view & thought. It is recommended to test the content or scripts of the site in the lab, before making use in the production environment & use it completely at your own risk. The articles, scripts, suggestions or tricks published on the site are provided AS-IS with no warranties or guarantees and confers no rights.

About Karsten Schneider 312 Articles
Consultant for Microsoft 365 Applications with a strong focus in Teams, SharePoint Online, OneDrive for Business as well as PowerPlatform with PowerApps, Flow and PowerBI. I provide Workshops for Governance & Security in Office 365 and Development of Solutions in the area of Collaboration and Teamwork based on Microsoft 365 and Azure Cloud Solutions. In his free time he tries to collect tipps and worthy experience in this blog.

Be the first to comment

Leave a Reply

Your email address will not be published.


*