Invalid parentId

RedSPINE
RedSPINE
edited 12/09/19 in API & Developers

Hello, I'm currently building a rather big script using the API and I'm now running into a problem that I can't understand. I'm just trying to add rows under another one, so I specify the parentId (which I've been doing for a really long time and it has always worked until now).

Response: {

  status: 400 Bad Request

  content: {

  {

    "errorCode": 1063,

    "message": "Invalid parentId: 2621140536977284",

    "refId": "vhjvfl6agezg"

  }

}

^ Here's one of the error I get, it always happen for the same row in my script. When I wipe the sheet and start again, it will throw the same error with newly created parent Id (created just before I try adding new rows under)

I'm sure this Id exists in the sheet. I can print it and it has always been there. After all that's logical since I get the Id from a preceding result of an add_rows method call. Does someone have any idea how this can actually be possible ?



Thank you.

Comments

  • dAVE Inden
    dAVE Inden Employee

    I would take a look at the hierarchal structure of the sheet at the time of the request. I reproduced this error when trying to update a row to be indented under a row that was already a child of the original row and is indented under it.

    For example, I had three rows in a sheet with row 3 indented under row 2 making row 2 the parent. I got this error when updating row 3 to be the parent of row 2. This can't happen because they already have a different hierarchal relationship.

  • Thank you very much sir.

    That was indeed the problem. I was refactoring my code and copied/pasted too fast and let a variable in a loop it had nothing to do inside.

    Have a nice day !

  • dAVE Inden
    dAVE Inden Employee

    That's awesome! I'm glad to hear you got it working.smiley