1

I have an enterprise wiki site collection inside our sharepoint on-premises 2013. and the enterprise wiki contain a server side remote event receiver which do the following:-

  • when a list item is approved.
  • the server side event receiver will create 50 wiki pages, based on 50 wiki pages which we are using as templates. it run as ItemAdded.

now i am planning to migrate the enterprise wiki site collection to sharepoint online. but i am not sure how i should migrate the server-side event receiver, where i find these 2 approaches:-

  1. First approach is to use remote event receiver. but i am trying to avoid this journey as remote event receiver are very complex especially on how they are deploy/host/debug them.
  2. second appraoch i am thinking of, is to write a .net console application which run periodically and then host it inside azure. and then using CSOM code inside the console application, to check for new approved items and create the wiki pages accordingly. of course using the Event Receiver the wiki pages will get created automatically after the approval, but using the console application the user have to wait for the next iteration to run(which is not a big issue).

so can anyone adivce on these 2 approaches, or if there is a third appraoch ?

  • 2
    If users do not have issue with waiting, then I will go with second approach. MS Flow can be third option but I am not sure whether it creates wiki page or not. – P S Mar 12 at 6:54
  • @PS i think waiting for 15-30 minutes will be acceptable – SharePoint TestDev Mar 12 at 11:18
1

Both are valid, implementation will really depend on how much custom dev you are doing. If you have more event receivers to migrate then it would be probably a good point to start learning about the remote event receivers. If it is your only one then your second approach is good. Alternatively you can look into WF Classic or Flow to meet your requirements.

  • i already worked on many remote event receivers, but i use them mainly if i need to run ItemAdding or ItemEditting. for example if i am doing a custom permission checking and i need to cancel the user submission the only option will be is to use itemadding, aditting RER, as i can not use console application in this case. but in my current case the server-side ER is itemadded and users can wait for couple of minutes for the wiki pages to get created. where using console app will be easier and more reliable especially for deploying/debugging them. and also upgrading it in the future – SharePoint TestDev Mar 12 at 11:14
  • for using the Flow, now in my case i am not just creating a new 50 wiki pages. what i am doing inside the server-side ER are 1) check a custom list which contain the 50 pages titles. 2) retrieve the 50 wiki pages from our root site. 3) replace a text named "custom name" inside the retrieve 50 wiki pages' titles & body with the approved item title... so will a FLow achieve these ? as for classic WF it will not.. – SharePoint TestDev Mar 12 at 11:17
  • 1
    With Flow you could use Azure function if your case is more complex. – Marek Sarad Mar 12 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.