Post

2 followers Follow
0
Avatar

Get custom fields using ResourceManagementQuery

I'm using the V2.0 REST API to pull out some data from our implementation for reporting purposes. We have several custom fields on Task, User & Project entities that I also need to pull back. However when I call data/resourceManagementQuery with the following JSON (slightly annotated)

{
"resourceEntitiesIds":[
"/User/XX_ID_XX" <-- removed ID
],
"definition":{
"setting":{
"fields":[
{
"typeName":"User.C_Department",
"fieldNames":"Department" <-- have tried passing in string array as per docs, but no different
}
],
"workOrRemainingEffort":"Work",
"loadOrAvailability":"Load",
"hoursView":true,
"reportingPeriod":"Monthly"
},
"globalFilters":{
"timeFilter":{
"to":"2015-11-01T00:00:00",
"from":"2015-08-01T00:00:00"
},
"projectsList":[
]
}
}
}

Its not bring back the custom field value. It doesn't throw an error, but returns all the entity details (User\Project) without the custom field. I know the field is there as I have queried the entity using data/entityQuery and the field is returned - C_Department \ MultiPickList.

What am I doing wrong?

Lewis Answered

Please sign in to leave a comment.

1 comment

0
Avatar

Hi Lewis,
Try specifying 'User' for typeName and C_Department (+ other USER fields you need in an array) for the fields definition.
The typeName property should be a Clarizen class, not a field name.

Hope this helps,
Ophir

Ophir Kenig 0 votes
Comment actions Permalink