문제

How to make User Field Type to restrict to SharePoint group using CAML Query, PowerShell.

$fieldXMLString = '<Field Type="User"
Name="'+$fieldName+'"
DisplayName="Primary Site Owner"
StaticName="'+$fieldName+'"
Group="'+$group+'"
UserSelectionMode="PeopleOnly"
Required="TRUE">
</Field>'

In the above code, I need to add another property which will point to SharePoint group. By doing this my control will be limited to a set of people.

This should be similar to SharePoint Choose from option using GUI. Regards, Vikrant

도움이 되었습니까?

해결책

You can use UserSelectionScope="GroupID" attribute to specify a group. GroupID is a group ID (integer).

You can see property description on the MSDN field schema description page

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top