问题
One of columns has 'Contact List' type with checked 'Allow multiple contacts per cell' see example.
I tried to add row using smartsheet-csharp-sdk(v2.3). Cell object:
new Cell
{
ColumnId = 111111,
Value = "Test@test.com",
Strict = false
}
and I got the next error:
{
"errorCode": 1235,
"message": "Value is not supported for this column type. Use objectValue instead.",
"refId": "163zew9slvgfq",
"detail": {
"index": 0
}
Then I tried to find how to pass ObjectValue and found only how pass 'Predecessor List', but nothing about multi 'Contact List'.
Question: How to add multi contact list cell using C# SDK ?
回答1:
Welcome to Stack Overflow, o.jev!
Unfortunately, the C# SDK does not currently support the multi-contact columns. If you wanted to update the value of a multi-contact cell, you'd have to make a native HTTP call (not using the SDK). This would require making a PUT
request to the row you want to update, and then your HTTP request body would look like this:
{
"cells": [
{
"columnId": 6654716978456452,
"objectValue": {
"objectType": "MULTI_CONTACT",
"values": [
{
"objectType": "CONTACT",
"email": "user1.email@smartsheet.com"
},
{
"objectType": "CONTACT",
"email": "user2.mail@smartsheet.com"
}
]
}
}
]
}
来源:https://stackoverflow.com/questions/53120487/smartsheet-add-row-with-multiple-values-in-cell-using-c-sharp-sdk