Staff Hardware and Software Requirements 2013-August-05

Report
Ready for what’s next.
The Evolution of SharePoint Event Receivers
SharePoint Saturday DC: Reston
December 7th, 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
—SharePoint 2013 Event Receiver Types Enumeration
—SharePoint 2013 Remote/App Events
• Demo
• Questions
• References
2
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
3
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
4
SharePoint 2007 Event Receiver Type Enumeration
ContextEvent
InvalidReceiver
ItemAdding
ItemUpdating
ItemDeleting
ItemCheckingIn
ItemCheckingOut
ItemUncheckingOut
ItemAttachmentAdding
ItemAttachmentDeleting
ItemFileMoving
FieldAdding
FieldUpdating
FieldDeleting
SiteDeleting
WebDeleting
WebMoving
ItemAdded
ItemUpdated
ItemDeleted
ItemCheckedIn
ItemCheckedOut
ItemUncheckedOut
ItemAttachmentAdded
ItemAttachmentDeleted
ItemFileMoved
ItemFileConverted
FieldAdded
FieldUpdated
FieldDeleted
SiteDeleted
WebDeleted
WebMoved
EmailReceived
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.12).aspx
5
SharePoint 2010 Event Receiver Type Enumeration
ContextEvent
InvalidReceiver
ItemAdding
ItemUpdating
ItemDeleting
ItemCheckingIn
ItemCheckingOut
ItemUncheckingOut
ItemAttachmentAdding
ItemAttachmentDeleting
ItemFileMoving
FieldAdding
FieldUpdating
FieldDeleting
SiteDeleting
WebDeleting
WebMoving
ItemAdded
ItemUpdated
ItemDeleted
ItemCheckedIn
ItemCheckedOut
ItemUncheckedOut
ItemAttachmentAdded
ItemAttachmentDeleted
ItemFileMoved
ItemFileConverted
FieldAdded
FieldUpdated
FieldDeleted
SiteDeleted
WebDeleted
WebMoved
EmailReceived
ListAdding
ListDeleting
WebAdding
WorkflowStarting
ListAdded
ListDeleted
WebProvisioned
WorkflowStarted
WorkflowPostponed
WorkflowCompleted
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.14).aspx
6
SharePoint 2013 Event Receiver Type Enumeration
ContextEvent
ItemAdded
ListAdding
GroupAdding
RoleDefinitionAdded
InvalidReceiver
ItemUpdated
ListDeleting
GroupUpdating
RoleDefinitionUpdated
ItemAdding
ItemDeleted
WebAdding
GroupDeleting
RoleDefinitionDeleted
ItemUpdating
ItemCheckedIn
WorkflowStarting
GroupUserAdding
RoleAssignmentAdded
ItemDeleting
ItemCheckedOut
ListAdded
GroupUserDeleting
RoleAssignmentDeleted
ItemCheckingIn
ItemUncheckedOut
ListDeleted
RoleDefinitionAdding
InheritanceBroken
ItemCheckingOut
ItemAttachmentAdded
WebProvisioned
RoleDefinitionUpdating InheritanceReset
ItemUncheckingOut
ItemAttachmentDeleted WorkflowStarted
ItemAttachmentAdding
ItemFileMoved
ItemAttachmentDeleting ItemFileConverted
RoleDefinitionDeleting
WorkflowPostponed RoleAssignmentAdding
EntityInstanceAdded
EntityInstanceUpdated
WorkflowCompleted RoleAssignmentDeleting EntityInstanceDeleted
ItemFileMoving
FieldAdded
InheritanceBreaking
AppInstalled
FieldAdding
FieldUpdated
InheritanceResetting
AppUpgraded
FieldUpdating
FieldDeleted
GroupAdded
AppUninstalling
FieldDeleting
SiteDeleted
GroupUpdated
ItemVersionDeleting
SiteDeleting
WebDeleted
GroupDeleted
ItemVersionDeleted
WebDeleting
WebMoved
GroupUserAdded
WebMoving
EmailReceived
GroupUserDeleted
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype(v=office.15).aspx
7
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 providerhosted apps). These receivers don't work with SharePoint-hosted
apps for SharePoint.
• In SharePoint 2013, the code
that runs when the event is
Hosting model
Support for remote
triggered is served by a web
event receivers
Auto-hosted
Yes
service. […]if you register a
Provider-hosted
Yes
remote event receiver, you also
SharePoint-hosted No
need to tell SharePoint which
http://msdn.microsoft.com/en-us/library/office/dn456315.aspx
web service to invoke.
8
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
9
References
• http://msdn.microsoft.com/enus/library/microsoft.sharepoint.speventreceivertype(v=office.15).aspx
• http://msdn.microsoft.com/en-us/library/office/jj220048.aspx
• http://msdn.microsoft.com/enus/library/microsoft.sharepoint.spitemeventreceiver.aspx
• http://msdn.microsoft.com/en-us/library/office/dn456315.aspx
• http://www.learningsharepoint.com/2012/12/27/create-a-groupuseraddedeventreceiverspsecurityeventreceiver-in-sharepoint-2013/
• [email protected]
• www.timferro.com
• @timferro
10

similar documents