Invalid parentId
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
-
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 !
-
That's awesome! I'm glad to hear you got it working.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives