I have a JavaScript array containing the string representation of some usernames (domain\username format).
Using the JavaScript CSOM, what is the best way to create a new item and add those usernames to that new item's multiple value user field?
|
I have a JavaScript array containing the string representation of some usernames (domain\username format). Using the JavaScript CSOM, what is the best way to create a new item and add those usernames to that new item's multiple value user field? |
|||
|
|
|
According to How to set people and group column programmatically using Client Object Model this is how you set single user fields:
According to Add multiple people using Javascript Client Object Model the following should work for Multi user fields:
|
|||||||||||||||
|
|
The Multiple User field is internally just a LookUp Field. The following code should work:
Instead of |
|||
|
|
The above solution didn't work for me. It is described here: Add multiple people using Javascript Client Object Model to a Field of Type SPFieldUserValue This is what worked for me:
|
||||
|
|