Forum Discussion
Event Receiver in SharePoint 2019
Hello Guys,
I am using SharePoint 2019 on-prem , Is it a good idea to use event receivers or it is going to depreciate from SharePoint. I am asking because I have created an event receiver but with modern experience and it is working as expected. But some weird things like it is not showing via Powershell. I have created it for Item added, Item adding or Item Updated. But nothing is showing. And also it is triggering for other lists and library even I am using ListUrl="Lists/listname" and correct scope.
So my question is Is is good practice to use event receiver in SharePoint 2019 on-prem modern SharePoint site or someone can also help me to understand the why event receiver is weird in SharePoint 2019 modern site.
3 Replies
- I'm not aware of any issues / dependencies of Event Receivers and modern experiences in SP 2019. AFAIK, Event Receivers should work in the same way, no matter if you are using the classic or modern experience.
- KD1502Copper Contributor
jcgonzalezmartin Even I am anticipated the same, But now I am trying to create an event receiver on web level and restricted only to trigger on a particular list. But I don't know why it is triggering to all the lists and libraries across the site. I have given list URL and set the scope as web in element.xml also for the feature I have given the scope web but still, it is not working as needed.