May 3, 2023 at 15:12 #36768Joe PenlandParticipant
I am having an issue where the DFFS form will not load if a user in a people field is disabled. It is crashing with the following error message:
“Cannot get value for projected field [people_field_name]_x005f_EMail.”
I see in the call to the REST API that the people field is being expanded and each property is being selected individually, including [people_field_name]/EMail. It appears when a user is disabled the REST API cannot resolve the expanded properties which are selected in the call.
There may be multiple ways to resolve this, but what comes to mind first is to just select the people field and then process what comes back and handle if any properties are missing rather than selecting the expanded properties. I realize this requires more processing in the front-end, but the error is coming from the REST API call and the data is not being returned.
The disabled user does not cause the built-in forms to fail: DispForm.aspx resolves the disabled user and renders properly.
STEPS TO RECREATE:
– Create list with people field (ours allows multiple people and groups).
– Create item with user in people field.
– Disable user account.
– Open form after account disable has synced across systems.
I updated to version 188.8.131.52 today and the issue is still present. Please let me know if you need any more information.
- This topic was modified 10 months ago by Joe Penland.
May 3, 2023 at 22:26 #36773
I was not able to recreate it by disabling an existing user, but when I added a new user that had no email address in the Azure AD properties I got the same error. That makes me think the problem is that your disabled user does not have an email in the userlist (because no license was assigned).
The problem is that for some reason the SharePoint REST api throws a fit when trying to expand a property that has a null-value (the empty EMail property).
I’ll look into it and see if I can make some changes to the query (by using renderListDataAsStream instead of getItemById) to resolve the problem.
May 5, 2023 at 12:34 #36780
I have figured out a solution and will publish a new version during the weekend.
May 6, 2023 at 20:17 #36788
Then new version has been published earlier today – let me know how it works out.
- You must be logged in to reply to this topic.