Forum Discussion
PaulL
Oct 20, 2022Brass Contributor
Error saving event when participant has an apostrophe in login name
In modern SharePoint Events web part, if you attempt to create an event, and add a participant user that has an apostrophe in their username, an error occurs:- "Can't save this event. Refresh thi...
ikas001
Dec 22, 2022Copper Contributor
Correct!!! This call fails when the userName has " ' ". Below you can automatically add extra single quote when before the existing one when using ensureUser endpoint
if(userName.search("'") >= 0) {
userName = userName.replace("'", "''");
}