SharePoint 2010 event receivers Real World Uses, Tips, and Tricks Caparea.NET SharePoint SIG July 19th, 2012 Timothy Ferro
Agenda My Background Overview of SharePoint 2010 Event Receivers Focus on List Item Events Demo References
My Background SharePoint Architect / Senior SharePoint Developer Associate at Booz Allen Hamilton 5 Years Developing MOSS 2007 and SharePoint 2010 Solutions Specializing in List Item Event Receivers, JavaScript, and Mapping Web Parts timothy.ferro@gmail.com www.timferro.com @timferro
Overview of SharePoint 2010 Event Receivers Main Types: Site Collection, Web, List, Field, Item, and Workflow Main Events: Creation, Update, Deletion, Modification, Conversion, Attachment Synchronous vs. Asynchronous Binding Event Receivers Disabling
Focus on List Item Events Event Receiver Base Class SPItemEventReceiver Available Event Host Types SPSite SPWeb SPList SPContentType Supported Events ItemAdding ItemAdded ItemDeleting ItemDeleted ItemUpdating ItemUpdated ItemFileConverted ItemFileMoving ItemFileMoved ItemCheckingIn ItemCheckedIn ItemCheckingOut ItemCheckedOut ItemAttachmentAdding ItemAttachmentAdded ItemAttachmentDeleting ItemAttachmentDeleted
Demo Setting up SharePoint 2010 Event Receiver Solution Feature Activation Code Event Receiver Code Event Receiver Examples Update Fields Validate Data Check Permissions Alerts and Emails “Workflow” Create Sites/Lists/Folders/Items
References timothy.ferro@gmail.com www.timferro.com @timferro http://msdn.microsoft.com/en- us/library/gg749858.aspx http://msdn.microsoft.com/en- us/library/gg981880.aspx http://msdn.microsoft.com/en- us/library/microsoft.sharepoint.spitemeventreceiv er.aspx