From your experience, what are some of the best practices around custom field types, their creation, deployment and maintenance. I am finding little on this topic online.
|
closed as not constructive by Kit Menke♦ Jan 13 '12 at 14:38
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
|
The following are the high-level steps that are required to create a custom field type. To create a custom field control Create a public custom field type class, which inherits from one of the built-in field type classes, such as SPFieldBoolen, SPFieldChoice, or SPFieldText. Add two public constructors using specific parameter list signatures and forward parameters to base class constructors with matching signatures. Create an XML file known as the field type deployment file. You must deploy it in a well-known directory that activates the custom field type on a farm-wide basis. Creating the Custom Field Class You must define the custom field class as public, and it must provide two nondefault constructors. This example also demonstrates how to validate field values using a regular expression by overriding the GetValidatedString method.
Creating the Field Type Deployment File The Field Type Deployment file contains a Collaborative Application Markup Language (CAML) definition of the custom field type. You must name this file following the pattern of fieldtypes*.xml and then deploy it in the 14\TEMPLATE\XML directory. The file in this example is named fldtypes_WingtipCustomFields.xml. Note: The SharePoint development tools in Microsoft Visual Studio 2010 let you use the $SharePoint.Project.AssemblyFullName$ token in place of the actual assembly name. The SharePoint tools replace this token with the assembly name when you compile your source files into a solution package. XML
For more information see this example |
|||
|
|