Question

Is it possible to create feature event receiver in SharePoint Online? My goal is to open custom task form based on content type which I do like following in case of on-premise:

  1. Create an empty SharePoint 2016 solution in Visual Studio

  2. Add a Feature and then add Event Receiver under it

  3. In "FeatureActivated" method write the following code:

    SPContentType MyApprovalProcess = web.ContentTypes["MyApprovalProcess"]; MyApprovalProcess.EditFormUrl = "_layouts/15/SP.Solution.MyProject/MyCustomForm.aspx";

After deploying feature, when you click on task then MyCustomForm.aspx opens.

Can I do the same in SharePoint Online i.e. to open custom task form using above or some other way?

Was it helpful?

Solution

Just like event receivers in classic model, we can use Remote Event Receivers (RER) in SharePoint Online.

However, there is no feature Event type in Remote Event Receivers. But in Remote Events, there is add-in Events like AppInstalled Event, this event will triggered after the add-in (app) installed which is suitable for your requirement to change some Content Type edit form url.

Check the reply by Jerry in another post of you in technet Forums.

https://social.technet.microsoft.com/Forums/en-US/a3ca753c-ce6f-4e93-9bd7-3887d4434066/using-feature-event-receiver-in-sharepoint-online?forum=SP2016

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