We have cleaned our userinfolist some times ago by removing users that were not anymore in our AD.
There is now a bug in the form when editing an item, the form crash and SharePoint gave us a nice Correlation ID.
So, what is the issue ? When a form contains a people picker and when this people picker fields contains a user who has been removed from the Site Collection, the form will no longer load when editing this item.
Here is a small part of the stack trace :
Microsoft.SharePoint.SPUser..ctor(SPWeb web, SPSecurableObject scope, String strIdentifier, Object[,] arrUsersData, UInt32 index, Int32 iByParamId, String strByParamSID, String strByParamEmail, SPUserCollectionType userCollectionType, SPUserCollectionFlags ucf, Boolean isSiteAuditor) at Microsoft.SharePoint.SPUserCollection.GetByIDNoThrow(Int32 id) at Nintex.Forms.SharePoint.FormControls.PeoplePickerFormControl.<>c.<EditModeDataBinding>b__46_0(SPFieldUserValue u) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Linq.Buffer`1..ctor(IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at Nintex.Forms.SharePoint.FormControls.PeoplePickerFormControl.EditModeDataBinding(String value) at Nintex.Forms.SharePoint.FormControls.PeoplePickerFormControl.OnFormControlDataBinding(Object sender, EventArgs e) at System.Web.UI.WebControls.CompositeControl.DataBind()
We are using Nintex Forms v22.214.171.124
We can load the form if we set this field to be render in "display" mode but it seems that in edit mode your code tries to build a SPUser without checking if the user still exists, an exception raises and is never catched.
Can you please provide some help ? Thanks.
Is the People Picker control limited/filtered by a SharePoint group?
If so, take a look at that group's settings.
Who can view the members of that group?
I ran into an issue where only the members of the group could view the members, rather than all users being able to view the members.
If only the members of the group can view the members, then anyone outside of that group will have issues. The problem you're running into may not be exactly the same, but I imagine it's very similar.
I am having the exact same issue as the original poster, and I don't believe it has anything to do with permissions or group settings. This is a generic people-picker, which chooses from all users.
The problem lies when removing orphaned/disabled users from the SharePoint site. We recently removed all of these users using ShareGate, and have now started having issues. I believe this happens because the SharePoint site itself no longer has a User record to recall when initializing the Edit Form and thus, throws an error. If I remove the orphaned user from the field via Datasheet/Edit view, the Nintex Edit form magically works again.
If anyone has a workaround for this it would be very appreciated!
If you all have Nintex workflow then what about using query user profile action. In that you can capture the error. If error capture is yes, then you can replace the PG field with some System Account or some other user? Make sure you initiate the workflow with highest privileges. If there are too many lists then you can create a site workflow and using web service you can simply trigger the main workflow to make updates in all the fields.
Also, if you have ShareGate tool, then it does give you the option of what to do with orphan users. But this works with when you're doing the migration.
Yes, in theory your method would fix my issue, and I would implement if the clients would want the User replaced in the field. However, in this case, for historical purposes they want to keep the original user in the field, making my job much harder. I understand that if there is no User in the Site User List, then Nintex cannot map the User field. This causes some issues, as I now have to figure out if I can somehow restore Orphaned Users to the Site User List to get the form working again. I wish I was aware of this when cleaning the Orphaned Users in ShareGate in the first place. Live and learn, I guess!
So far, the issue has presented itself in 3 lists (about 2000 items total). Not every record is effected, but we do use Nintex Forms/WF in many sites across the entire farm (1000+ sites). My worry is that this issue will continue to arise as time passes.
We have discussed adding 'Legacy' Single Line of Text fields to hold the original Person names for the two effected People Picker fields, but this is a last resort.