1

I have a problem with the Smartsheet API. I'm trying to create an Excel Addin to add multiple rows to Smartsheet. For this reason I need a way to update predecessors. The programming language I'm using is C#. As soon as I want to run an update I get an Exception with the message "update predecessor".

So the question is: Is it generally possible to update predecessors on Smartsheet via C# and if, how do I do that?

Thank you very much!

2 Answers2

0

According to the Smartsheet API documentation, it's not currently possible to update data in a Predecessor column:

enter image description here

Kim Brandl
  • 13,125
  • 2
  • 16
  • 21
  • Mhm, okay, thanks. I hope, they may include this feature in the future ;) – Blood chief Sep 24 '16 at 14:34
  • See answer from @daveskull81 below -- looks like it IS possible to update predecessor data now with the API. (Apparently the portion of the docs I referenced is no longer current/accurate.) When you get a chance, please mark Dave's answer as "Accepted" (instead of mine), so that others can benefit from this info in the future. Thanks! – Kim Brandl Sep 27 '16 at 15:29
0

The Smartsheet API does allow the updating of Predecessor values via the API using the objectValue object: http://smartsheet-platform.github.io/api-docs/#objectvalue-object

It is important to note that this is only available when working with the API directly and isn't available in the SDKs at this time.

An example request to update a Predecessor on a row would look like this:

PUT https://api.smartsheet.com/2.0/sheets/{{sheetId}}/rows

Request Body:

{
 "id": ROW_ID_WHERE_CREATING_PREDECESSOR,
 "cells": [
    {
        "columnId": COLUMN_ID,
        "objectValue": {
            "objectType": "PREDECESSOR_LIST",
            "predecessors": [
                    {
                        "rowId": ROW_ID_OF_PREDECESSOR_ROW,
                        "type": "FS"
                    }
                ]
        }
    }
 ]

}

The objectValue object is relatively newer and it looks like some of the documentation needs to be updated still.

daveskull81
  • 627
  • 4
  • 7
  • Nice! Thanks for chiming in with this info, @daveskull81! Hopefully someone will update the API docs soon :) – Kim Brandl Sep 27 '16 at 15:27