Home › Forums › Modern DFFS › Disabled user error
- This topic has 4 replies, 2 voices, and was last updated 1 year, 6 months ago by Alexander Bautz.
-
AuthorPosts
-
-
May 3, 2023 at 15:12 #36768
PROBLEM:
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.”
TROUBLESHOOTING:
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.SUGGESTION:
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 1.0.21.0 today and the issue is still present. Please let me know if you need any more information.
- This topic was modified 1 year, 6 months ago by Joe Penland.
-
May 3, 2023 at 22:26 #36773
Hi,
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.
Alexander
-
May 4, 2023 at 12:56 #36774
Hi Alexander,
That sounds like it is most likely the issue. Our company does remove the license when it disables a user account. Thanks for looking into this.
Joe
-
-
May 5, 2023 at 12:34 #36780
I have figured out a solution and will publish a new version during the weekend.
Alexander
-
May 6, 2023 at 20:17 #36788
Then new version has been published earlier today – let me know how it works out.
Alexander
-
-
AuthorPosts
- You must be logged in to reply to this topic.