Can you update a mulivalue choice field via REST API in SharePoint 2010?
If I perform a simple GET
I receive:
{
"d": {
"__metadata": {
"uri": "http://dev.domain/sites/plm/_vti_bin/ListData.svc/MarketNeed(1)",
"etag": "W/\"9\"",
"type": "Microsoft.SharePoint.DataService.MarketNeedItem"
},
"ContentTypeID": "0x0100D93C50E37E1AA144B940BA546F3287FF",
"Title": "I changed the title.",
"ProblemStatement": "Shellworker Streetwise A Fret Whishted Shalt Fiver Wool Tv. Hoc Positum In Phaedro A Platone Probavit Epicurus. Theraphosoid Tee Ha, Flip, If Teal If Atwirl A.",
"RequestorOrganization": {
"__deferred": {
"uri": "http://dev.domain/sites/plm/_vti_bin/ListData.svc/MarketNeed(1)/RequestorOrganization"
}
},
"RequestorOrganizationValue": null,
"Confidentiality": "None",
"MarketNeedID": "7542f43a-093b-4bd4-a29d-101eea7e166b",
"Request_ID": "NONE-00001",
"CustomerRequestor": {
"__deferred": {
"uri": "http://dev.domain/sites/plm/_vti_bin/ListData.svc/MarketNeed(1)/CustomerRequestor"
}
},
"CustomerRequestorId": null,
"ContactInformation": null,
"Grouping": {
"results": [
{
"__metadata": {
"uri": "http://dev.domain/sites/plm/_vti_bin/ListData.svc/MarketNeedGrouping('System%20Software')",
"type": "Microsoft.SharePoint.DataService.MarketNeedGroupingValue"
},
"Value": "System Software"
},
{
"__metadata": {
"uri": "http://dev.domain/sites/plm/_vti_bin/ListData.svc/MarketNeedGrouping('Factory%20Fit%20System%20Software')",
"type": "Microsoft.SharePoint.DataService.MarketNeedGroupingValue"
},
"Value": "Factory Fit System Software"
}
]
}
}
}
I am sending the following payload as a POST with merge and check the etag:
{
"Title":"I changed the title again.",
"Grouping": {
"results": [
{
"__metadata": {
"uri": "http://dev.domain.net/sites/plm/_vti_bin/ListData.svc/MarketNeedGrouping('System%20Software')",
"type": "Microsoft.SharePoint.DataService.MarketNeedGroupingValue"
},
"Value": "System Software"
},
{
"__metadata": {
"uri": "http://dev.domain.net/sites/plm/_vti_bin/ListData.svc/MarketNeedGrouping('Factory%20Fit%20System%20Software')",
"type": "Microsoft.SharePoint.DataService.MarketNeedGroupingValue"
},
"Value": "Factory Fit System Software"
},
{
"__metadata": {
"uri": "http://dev.domain.net/sites/plm/_vti_bin/ListData.svc/MarketNeedGrouping('Special%20Kitting')",
"type": "Microsoft.SharePoint.DataService.MarketNeedGroupingValue"
},
"Value": "Special Kitting"
}
]
}
}
And I get the following error:
{
"error": {
"code": "",
"message": {
"lang": "en-US",
"value": "Error processing request stream. The payload must represent a valid array format for collections."
}
}
}
If I remove the "Grouping" object and just change the title, everything works like a charm. But that is of little use to me.