Question

Does UserMulti field have a limit on how much users are selected? I'm asking this because when I use client object model I can set at most 15 users at once.

edit: I can add more users directly on SharePoint. So the question is if there is a limit on how much users can be set on UserMulti using client object model?

edit: I discovered some funny pattern... each odd user in the list is added correctly, but each even is not...

var users = new List<FieldUserValue>();
//for loop in which I add users to list like this 
//users.Add(new FieldUserValue() { LookupId = someId });
item["myUserMultiField"] = users.ToArray();
Was it helpful?

Solution

When you save the users into the item, you need to delimit them with ;#.

For example, 44;#Barack Obama;#43;#George Bush;#42;#Bill Clinton. I think you can even get away with specifying only the IDs but you still need the delimiters.

See a similar issue on StackOverflow.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top