In this third post on Remote Event Receivers we are going to explore the mechanics revolving around Remote Event Receivers on List/ List Item Events. The previous two posts in this series can be seen at:

  1. SharePoint 2013: Remote Event Receivers
  2. SharePoint 2013: How to develop Remote Event Receivers for App Events

In order to showcase this scenario we need to start with a Provider Hosted App as highlighted in the following steps:

On List Settings Page

In List Designer

The Remote Event Receiver. Yes!

Once we are done with the configuration steps as shown above, we can see following artifacts added to the Project as highlighted below:

If we notice Remote Web Project which is nothing but an ASP.Net Application, we can see the following artifacts added already to it:

We will revisit the Service Class Code in a short while to understand its internal plumbing.

But for now let’s build the Solution and Run it.



Trust the App with all needed permissions when prompted.



As soon as we Grant the App with all of the required permissions, the App Launcher redirects the User to the Start Page for the App, which is residing in the Remote Web for this case as highlighted below:



We can see the App Launcher added to the Site Contents of the Host Web as shown below:



We can ensure the presence of App Web by using SharePoint Manager and inspects Products List that has been provisioned to the App Web during the App Deployment.



We can browse the App Web from Browser also as shown below:



Now in order to test the Event Receiver, let’s create a test item in Products List as shown below:



Specify Product Name & Price and Click Save button.



As soon as Item gets added, it triggers “ItemAdded” event which is delegated to Remote Event Receiver by SharePoint.

In Remote Event Receiver we have two methods “ProcessEvent” & “ProcessOneWayEvent”.

For more details on these methods you can revisit my earlier post SharePoint 2013: Remote Event. Receivers.

On Item added we can see Breakpoint hit in “ProcessEvent” Method as shown below:



Similarly we can see Break Point hit every time the Item gets updated as highlighted in below steps.







Likewise we can see Break Point hit when Item gets deleted as highlighted in below steps





Since we registered the Event Receivers to handle “ItemAdded”, “ItemUpdated”, “ItemDeleted” only so none of the other Events would be delegated to Remote Event Receiver by SharePoint.

In case if any more Events need to be handled we need to add <Receiver> Elements in the Element.xml file associated with Remote Event Receiver as and when needed.

SPRemoteEventProperties Object is your real friend

“ProcessEvent” method of Remote Event Receiver provides an object called as“properties” that exposes a lot of useful properties that can help us to perform any desired operation on the Web or List or List Item.

Following are the important properties that are exposed by “properties” object:

This post is more focused on the mechanics offered by SharePoint around Remote Event Receivers for List/List Item Events.

We will meet in another post where it will be more focused on to the implementation details on Event Receivers dancing around some valid Business Use Cases.