Event Receiver in SharePoint 2019

Occasional Contributor

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.

@Juan Carlos González Martín 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. 

@KD1502 That is a well documented and old issue. You're better off just adding the list event receiver with code from the feature activation event receiver.