Question

I have being working with on-premise sharepoint 2013. and a lot of functionalities i have been doing were implemented inside Event Receivers when item added/updated.

Where inside Visual Studio 2012 Professional, i create the event receivers and using server-side object model SSOM i update certain fields, send API requests to external system , send emails, etc.

Now we are going to work with office 365 sharepoint, and as i know event receivers + serve-side object model are not available inside sharepoint online.

So let say i want to implement a scenario such as:- an item Priority will be set to "high" if the user who create the item is within the "Company Manager" security group.

Now inside SharePoint 2013 on-premise, i would create an event receiver using VS 2012, and using server-side object model will allow me to access the item fields , security groups , and then updates the item Priority field.
so inside sharepoint online what will be the appraoch i need to follow? which mimic Event Receivers & SSOM ?? Thanks

Was it helpful?

Solution

You have two options for this type of event handling when developing for SharePoint Online: Remote Events Receivers and WebHooks.

Remote Event Receivers are similar to Server-Side Event Receivers but instead of the event triggering a call to code running on the SharePoint Server, it triggers a call to an external web service. In that web service you can use the Client Object Model to interact with SharePoint. See Use remote event receivers in SharePoint for more information.

The other option we have is Webhooks which are more of an industry standard way of handling events with a web service. You register your endpoint as a handler for an event and then SharePoint will send a message to your endpoint when an event occurs. See Office Dev PnP Web Cast – Introducing SharePoint WebHooks for more information.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top