More Related Content Similar to Eugene Rosenfeld: SharePoint Custom Field Types Similar to Eugene Rosenfeld: SharePoint Custom Field Types (20) More from SharePoint Saturday NY More from SharePoint Saturday NY (16) Eugene Rosenfeld: SharePoint Custom Field Types1. SharePoint Custom Field Types Eugene Rosenfeld CTO, Black Blade Associates 2-time SharePoint MVP erosenfeld@blackbladeinc.com www.blackbladeinc.com thingsthatshouldbeeasy.blogspot.com 13. Add a field that is based on a custom field type to a list 14. Edit a list field that is based on a custom field type 15. Show data stored in a custom field type instance in the list item display form 22. Any custom data structure is fair game, as long as it is serializable as text 25. Think of field render controls as custom web parts that are always associated with all instances of the custom field type 33. Custom field type properties are meant to allow users to modify the behavior of a custom field type instance 38. As with the field data, developers can define custom rendering and validation for custom field type properties 86. May prevent the use of third party tools or applications if these can not deal with custom field types 93. You want the custom defined rendering to always be associated with the field data 94. You want to define custom rendering that will be used in the listview web part when the field data is shown in the listview 95. You want to define custom rendering for field data that will be used in all instances of the display item, new item, and edit item forms for list items that contain the a field instance 97. You want to define custom rendering for a group of fields 98. You want to create views that aggregate information from multiple list items 99. You want to give users the ability to drag the custom rendering onto a web part page through a web browser 101. Both can prevent changing list data from being saved to the content database 103. You want the field code to run for every item an item is changed or added to every list with an instance of the field type exists 104. Note: Two field instances of a custom field type means the code runs twice! 106. You want to be able to activate or deactivate the code for all lists within a particular site (i.e. feature) 108. You want the field code to run for every item an item is changed or added to every list with an instance of the field type exists 109. Note: Two field instances of a custom field type means the code runs twice! 110. You want to execute code that finishes running quickly and stores no long-term state information (other than the actual list item field data) 112. You want to allow users to be able to associate the code with specific list instances through a web browser 113. You want to give users the option to execute the code automatically or manually 115. You will need to collect information from users involved in the code execution through the browser 121. This is the entry point that the WSS runtime uses to start addressing your custom field type 123. A class the inherits from the SPFieldclass, more commonly, from another class that inherits from SPField, such as SPFieldMultiColumn 124. The type defined by the FieldTypeClassattribute must implement two constructors: public MyFieldComputed (SPFieldCollection fields, string fieldName) : base(fields, fieldName){} public MyFieldComputed (SPFieldCollection fields, string typeName, string displayName) : base(fields, typeName, displayName){} <FieldType> <Field Name="TypeName">MyComputed</Field> <Field Name="TypeDisplayName">$Resources:core,fldtype_computed;</Field> <Field Name="ParentType"> Computed </Field> <Field Name="FieldTypeClass">MySharePoint.MyFieldComputed</Field> <RenderPattern Name="PreviewDisplayPattern"> <HTML><![CDATA[["]]></HTML><Property Select="DisplayName" HTMLEncode="TRUE"/><HTML>"$Resources:core,fldtypes011;</HTML> </RenderPattern> <RenderPattern Name="PreviewEditPattern"><Property Select="DisplayName" HTMLEncode="TRUE"/></RenderPattern> <RenderPattern Name="PreviewNewPattern"><Property Select="DisplayName" HTMLEncode="TRUE"/></RenderPattern> </FieldType> 139. Requires an IIS application pool recycle or an IISRESET in order for changes to take affect. 148. Closeout Remember to fill out evaluations for your chance to win cool prizes! 2 ASUS Netbooks Also Some Books 1 Typemock Isolator License A 2-5 Day Course from SetFocus on SharePoint Telerik RAD Controls Set 1 DeliverPointWFE 2010 license (Worth $1500) 1 BCS Meta Man license (Worth $1200) 1 Lightning Conductor 2010 WFE license (Worth $800) 1 Lightning Storm Forums license. (Worth $600) Closeout Remember to fill out evaluations for your chance to win cool prizes! 3 Apple IPAD 32 GB Wifi