I work with UserFields and I set it's properties:
As you can see on screenshot there are only three properties for Field Type "Person or Group":
- SuppressNameDisplay
- UserSelectionMode
- UserSelectionScope
It has two values:
- People Only
- People and Groups
The problem is that these values are incorrect. When you try to use this SharePoint list or if you try to navigate to UserField's property page you will get the error:
ArgumentException: Requested value 'People Only' was not found.
Cause:
According MSDN, correct values are without spaces:
- PeopleOnly
- PeopleAndGroups
To solve the problem, open schema.xml file of the list definition in XML Editor and fix SelectionMode value like this:
<Field Name="SomeUserField" ID="{5b1c3a12-3c4a-4fe3-81c4-5aeab2207914}" DisplayName="SomeUserField" Type="UserMulti" Mult="TRUE" ShowInDisplayForm="FALSE" ShowInEditForm="FALSE" ShowInListSettings="TRUE" ShowInNewForm="FALSE" ShowInViewForms="FALSE" SuppressNameDisplay="FALSE" UserSelectionScope="0" UserSelectionMode="PeopleOnly" />That's it!
Additional Environment Info:
Visual Studio 2012 exact version is 11.0.50727.1 RTMREL
SharePoint 2010 Enterprise.
Update1:
The bug is posted to Microsoft Connect with no response from MS yet.
Nice article and nice bug!
ReplyDeletePlease, write more! :)
Thanks Den. I will!:)
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteAs of today, this bug is finally fixed.
ReplyDeleteGreat!:)
ReplyDelete