A family of Microsoft on-premises document management and storage systems.
SPEventReceiverStatus.CancelNoError showing error even when it is not supposed to
Frank Martin
526
Reputation points
I am developing GroupUserAdding event receiver in which I am using SPEventReceiverStatus.CancelNoError but it is still throwing error "Sorry, something went wrong" when someone tries to add user in group. It is for SharePoint 2016. Here is my code:
Typing from mobile so formatting may not be there.
public override void GroupUserAdding(SPSecurityEventProperties properties)
{
base.GroupUserAdding(properties);
base.EventFiringEnabled = false;
properties.Status = SPEventReceiverStatus.CancelNoError;
base EventFiringEnabled = true;
}
Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | Development
The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | SharePoint | For business | Windows
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Sign in to answer