the evolution of sharepoint event receivers
DESCRIPTION
The Evolution of SharePoint Event Receivers. SUGDC December 12 th , 2013 Timothy Ferro. Agenda. My Background Overview of Traditional Event Receivers Changes from 2007 to 2010 to 2013 SharePoint 2007 Event Receiver Type Enumeration SharePoint 2010 Event Receiver Types Enumeration - PowerPoint PPT PresentationTRANSCRIPT
Ready for what’s next.
The Evolution of SharePoint Event Receivers
SUGDCDecember 12th, 2013Timothy Ferro
2
Agenda•My Background• Overview of Traditional Event Receivers• Changes from 2007 to 2010 to 2013—SharePoint 2007 Event Receiver Type Enumeration—SharePoint 2010 Event Receiver Types Enumeration—SharePoint 2013 Event Receiver Types Enumeration—SharePoint 2013 Remote/App Events• Demo• Questions• References
3
My Background• SharePoint Development Team Lead / SharePoint Architect • Associate at Booz Allen Hamilton• Author / Speaker / Blogger / Tweeter• 6+ Years Architecting and Developing SharePoint Solutions•White Paper:
Utilizing and Visualizing Geolocation Data for Powerful Analysis• [email protected]•www.timferro.com•@timferro
4
Overview of Traditional Event Receivers• An event receiver in Microsoft SharePoint is simply a method that
is called when a triggering action occurs on a specified SharePoint object. Triggering events include actions such as adding, updating, deleting, moving, checking in, and checking out. SharePoint objects that listen for events—that is, event receiver hosts—include objects such as site collections, sites, lists, and workflows. http://msdn.microsoft.com/en-us/library/gg749858(v=office.14).aspx
• Synchronous vs. Asynchronous Events• Binding Event Receivers• Disabling Event Receivers
5
SharePoint 2007 Event Receiver Type EnumerationContextEvent ItemAddedInvalidReceiver ItemUpdatedItemAdding ItemDeletedItemUpdating ItemCheckedInItemDeleting ItemCheckedOutItemCheckingIn ItemUncheckedOutItemCheckingOut ItemAttachmentAddedItemUncheckingOut ItemAttachmentDeletedItemAttachmentAdding ItemFileMovedItemAttachmentDeleting ItemFileConvertedItemFileMoving FieldAddedFieldAdding FieldUpdatedFieldUpdating FieldDeletedFieldDeleting SiteDeletedSiteDeleting WebDeletedWebDeleting WebMovedWebMoving EmailReceivedhttp://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.12).aspx
6
SharePoint 2010 Event Receiver Type EnumerationContextEvent ItemAdded ListAddingInvalidReceiver ItemUpdated ListDeletingItemAdding ItemDeleted WebAddingItemUpdating ItemCheckedIn WorkflowStartingItemDeleting ItemCheckedOut ListAddedItemCheckingIn ItemUncheckedOut ListDeletedItemCheckingOut ItemAttachmentAdded WebProvisionedItemUncheckingOut ItemAttachmentDeleted WorkflowStartedItemAttachmentAdding ItemFileMoved WorkflowPostponedItemAttachmentDeleting ItemFileConverted WorkflowCompletedItemFileMoving FieldAddedFieldAdding FieldUpdatedFieldUpdating FieldDeletedFieldDeleting SiteDeletedSiteDeleting WebDeletedWebDeleting WebMovedWebMoving EmailReceived
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.14).aspx
7
SharePoint 2013 Event Receiver Type EnumerationContextEvent ItemAdded ListAdding GroupAdding RoleDefinitionAddedInvalidReceiver ItemUpdated ListDeleting GroupUpdating RoleDefinitionUpdatedItemAdding ItemDeleted WebAdding GroupDeleting RoleDefinitionDeletedItemUpdating ItemCheckedIn WorkflowStarting GroupUserAdding RoleAssignmentAddedItemDeleting ItemCheckedOut ListAdded GroupUserDeleting RoleAssignmentDeletedItemCheckingIn ItemUncheckedOut ListDeleted RoleDefinitionAdding InheritanceBrokenItemCheckingOut ItemAttachmentAdded WebProvisioned RoleDefinitionUpdating InheritanceResetItemUncheckingOut ItemAttachmentDeleted WorkflowStarted RoleDefinitionDeleting EntityInstanceAddedItemAttachmentAdding ItemFileMoved WorkflowPostponed RoleAssignmentAdding EntityInstanceUpdatedItemAttachmentDeleting ItemFileConverted WorkflowCompleted RoleAssignmentDeleting EntityInstanceDeletedItemFileMoving FieldAdded InheritanceBreaking AppInstalledFieldAdding FieldUpdated InheritanceResetting AppUpgradedFieldUpdating FieldDeleted GroupAdded AppUninstallingFieldDeleting SiteDeleted GroupUpdated ItemVersionDeletingSiteDeleting WebDeleted GroupDeleted ItemVersionDeletedWebDeleting WebMoved GroupUserAddedWebMoving EmailReceived GroupUserDeleted
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.15).aspx
8
SharePoint 2013 Remote/App Events• App Events: Installed, Upgraded, Uninstalling• Remote Events: your cloud app can respond when a user adds,
changes, or deletes a list, a list item, or a web.• Remote event receivers and app event receivers work only with
cloud apps for SharePoint (that is, autohosted and provider-hosted apps). These receivers don't work with SharePoint-hosted apps for SharePoint.•
http://msdn.microsoft.com/en-us/library/office/dn456315.aspx
Hosting model Support for remote event receivers
Auto-hosted Yes
Provider-hosted Yes
SharePoint-hosted No
In SharePoint 2013, the code that runs when the event is triggered is served by a web service. […]if you register a remote event receiver, you also need to tell SharePoint which web service to invoke.
9
Demo• SharePoint 2010 and 2013• Setting up SharePoint Event Receiver Solutions• Feature Activation Code• Event Receiver Code• Event Receiver Examples—Update Fields—Check Permissions—Alerts and Emails—Create Sites/Lists/Folders/Items—“Workflow”—Users Added to Groups
10
References / Questions / Evaluations• http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=o
ffice.15).aspx• http://msdn.microsoft.com/en-us/library/office/jj220048.aspx• http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.aspx• http://msdn.microsoft.com/en-us/library/office/dn456315.aspx• http://www.learningsharepoint.com/2012/12/27/create-a-groupuseradded-eventreceiv
erspsecurityeventreceiver-in-sharepoint-2013/• [email protected]• www.timferro.com• @timferro