For example I have a list call "shopping list", it has 2 columns. 1st Column Type is People or Groups(Allows Multiple People), the Column Name is "Customers". 2nd Column Type is string.
I can use ajax to post information to the normal SharePoint List, but just not to this Shopping List. I know how to format the data for single user column, but not for multiple users column, The single user column is something like: The column name is Customer, the data format should be:
item.CustomerID=1;
I have tried lots of way to format the data, but it is still the same. The server return 500 without any useful information. Example formats below:
item.Customers = [1,2,3] //1,2,3 is the user id in SharePoint.
item.CustomersID=[1,2,3] //1,2,3 is the user id in SharePoint.
item.Customers=[{UserId:1},{UserId:2},{UserId:3}]
I can confirm that the javascript object has been stringify and the post request is correctly sent as I successfully added new items to the same list without filling in the Customers Column.
Can someone please advise me what is the correct format to post content to SharePoint 2010 REST API with multiple user columns.