Expand my Community achievements bar.

Join us LIVE in San Francisco on November 14th for Experience Makers The Skill Exchange. Don't miss out on this free learning event!
SOLVED

How to change the categoryOrder of Object Category by using custom API?

Avatar

Level 3

How to change the categoryOrder of Object Category by using custom API?

 

I'm getting error when I configured API module

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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