0

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!

4
  • 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
    Commented Jun 22, 2018 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
    Commented Jun 22, 2018 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
    Commented Jun 22, 2018 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
    Commented Jun 22, 2018 at 20:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.