Skip to content

Setting UserDisplayOptions #1260

Closed Answered by jansenbe
ajcaterino asked this question in Q&A
Aug 18, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

@ajcaterino : load the list field you want to update, read the SchemaXml property of that field (https://pnp.github.io/pnpcore/api/PnP.Core.Model.SharePoint.IField.html#PnP_Core_Model_SharePoint_IField_SchemaXml) and add/update the UserDisplayOptions="NamePhoto" element to the XML and then save it back (see https://pnp.github.io/pnpcore/using-the-sdk/fields-intro.html#updating-site-and-list-fields). The resulting field SchemaXml can look like this:

<Field ClientSideComponentId="00000000-0000-0000-0000-000000000000" DisplayName="PersonSingle" Format="Dropdown" List="UserInfo" Name="PersonSingle" 
Title="PersonSingle" Type="User" UserSelectionMode="1" UserSelectionScope="0" UserDisplayOptions=

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ajcaterino
Comment options

@jansenbe
Comment options

Answer selected by ajcaterino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants