How to change the categoryOrder of Object Category by using custom API?
I'm getting error when I configured API module
Solved! Go to Solution.
Views
Replies
Total Likes
Hi there,
what you're trying to do turned out to be possible actually, just tested it.
The approach you've taken, to update object category itself is wrong, because object categories are always associated with a specific object, e.g. task.
So what you are updating at the end of the day is task, not object category itself, and by this you are modifying order of object categories, or in other words order of custom forms in task details. Here is how body of my call looks like:
{"ID":"6567e4e522d696febbc905af1f444123",
"objectCategories": [
{
"ID": "6567e4e522d6970efff0b34a43184c0f",
"objCode": "OBJCAT",
"categoryOrder": 1
},
{
"ID": "6567e4e622d69b28f767f9c7bb368a71",
"objCode": "OBJCAT",
"categoryOrder": 0
}
]}
I used PUT method, TASK endpoint
good luck
Hi there,
what you're trying to do turned out to be possible actually, just tested it.
The approach you've taken, to update object category itself is wrong, because object categories are always associated with a specific object, e.g. task.
So what you are updating at the end of the day is task, not object category itself, and by this you are modifying order of object categories, or in other words order of custom forms in task details. Here is how body of my call looks like:
{"ID":"6567e4e522d696febbc905af1f444123",
"objectCategories": [
{
"ID": "6567e4e522d6970efff0b34a43184c0f",
"objCode": "OBJCAT",
"categoryOrder": 1
},
{
"ID": "6567e4e622d69b28f767f9c7bb368a71",
"objCode": "OBJCAT",
"categoryOrder": 0
}
]}
I used PUT method, TASK endpoint
good luck
I know this is like 2 years later but here is the actual body I used to make this work. The only real difference is I used "categoryID" instead of "ID" as the latter didn't work.
{"ID":"6841eca50004ea4af008021c6258b5f8",
"objectCategories": [
{
"categoryID": "67813ed200157f9a83168586cc987758",
"objCode": "OBJCAT",
"categoryOrder": 3
},
{
"categoryID": "67b7572d00028ae23fbfdd4a15383b56",
"objCode": "OBJCAT",
"categoryOrder": 2
},
{
"categoryID": "6841adee0000213844db5214aaaff861",
"objCode": "OBJCAT",
"categoryOrder": 1
},
{
"categoryID": "68445a960000338e84bc4db516f2f59f",
"objCode": "OBJCAT",
"categoryOrder": 0
}
]}
Views
Likes
Replies