I have a jquery script placed on a list edit form that removes resolved user from a people picker field. But the problem I am having is, it works for certain users and it doesn't for others. I tried with different groups changing custom permission levels to no avail. Anyone with ideas is much appreciated!

  • Can you post the script that removes the user, is it removing the "current" user from the field if present upon entering edit mode? – Chad Jun 22 '18 at 19:37
  • I used a pretty much standard function that's out there... SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id]; var AllResolvedUsers=spPeoplePicker.GetAllUserInfo(); AllResolvedUsers.forEach(function (index) { spPeoplePicker.DeleteProcessedUser(AllResolvedUsers[index]); }); document.getElementById(spPeoplePicker.InitialHelpTextElementId).style.display = 'inline'; } – user76906 Jun 22 '18 at 20:06
  • Are you sure it's a permission issue? Have you checked the console/network tab for a user that's experiencing issues? It might be related to scripts loading out of order, refer here for what I mean: sharepoint.stackexchange.com/questions/166753/… – Chad Jun 22 '18 at 20:13
  • Thanks for you reply Chad, I figured it out and yeah it was a permissions issue on where the jquery-ui was referenced. some of the people in the group had access to that site collection where the jquery-ui resides and some didn't. That was the reason. – user76906 Jun 22 '18 at 20:30

Your Answer

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

Browse other questions tagged or ask your own question.