Search code examples
smartsheet-api

Set Finish Project Column via API


When I attempt to set the Finish column on a row in a sheet via the SmartSheet API, I get the following message:

{
    "errorCode": 1080,
    "message": "End Dates on dependency-enabled sheets cannot be created/updated. Please update either the Duration or Start Date column.",
    "refId": "19ufon4xzsn7y",
    "detail": {
        "index": 0,
        "rowId": 4987804240111492
    }
}

If I want to clear the project dates for a specific row I can set the Duration and Start columns to null, but the Finish date remains. See https://smartsheet-platform.github.io/api-docs/#update-rows

What is the programmatic way to clear the project dates, including Finish, for a row?


Solution

  • I don't believe it's possible to programmatically update Finish date whenever dependencies are enabled for the sheet. Note, this is the sheet setting (in the Smartsheet UI) that specifies dependencies are enabled for a sheet:

    enter image description here

    If I manually uncheck this box and save the change via the Smartsheet UI, then I'm subsequently able to successfully update Finish dates via the API. Unfortunately it doesn't seem possible to disable dependencies for the sheet via API (i.e., the programmatic equivalent of unchecking this box). I tried doing so, but received an error indicating that you cannot set the dependenciesEnabled property via API.

    REQUEST:

    PUT /sheet/{sheetId)
    {
       "dependenciesEnabled": false
    }
    

    RESPONSE:

    {
        "errorCode": 1032,
        "message": "The attribute(s) sheet.dependenciesEnabled are not allowed for this operation.",
        "refId": "10pl3li0rs9b"
    }