Post

2 followers Follow
0
Avatar

API request returning error when trying to retrieve "UCTimePhaseMonthly" records

I am receiving an error when making an api request to retrieve "UCTimePhaseMonthly" records.

Request details:
POST to: https://api2.clarizen.com/v2.0/services/data/entityQuery
Header: Authorization = Session ######
Body:
{
"typeName": "UCTimePhaseMonthly",
"fields": ["CreatedBy","CreatedOn","LastUpdatedBy","LastUpdatedOn","LastUpdatedBySystemOn","EntityType","ExternalID","UserOrUserGroup","Date","WorkingHours","Capacity","NonWorkingException","CapacityCost","BillableCapacity","CostOfWorkingHours","CostOfCalendarException","FiscalMonth"],
"orders": [{
"fieldName": "ActualApproved_Training",
"order": "Descending"
}],
"paging": {
"from": 0,
"limit": 1,
"hasMore": true
}
}

Error:
{
"errorCode": "InvalidField",
"message": "Entity 'UCTimePhaseMonthly' does not contain the field 'ActualApproved_Training'",
"referenceId": "3iCFtyOMACKP8QTsX1rgtm"
}
As you can see in the request I am not including "ActualApproved_Training" in the field list.

Nathan Lang Answered

Official comment

Avatar

Hi Nathan,

You're including it in ordering:

Could you please remove it and let me know if it helps?

Thank you,

Roland

Roland Pumputis
Comment actions Permalink

Please sign in to leave a comment.

2 comments

0
Avatar

Hey Roland,

Thanks for catching that. That was the issue thank you for the help.

Nathan Lang 0 votes
Comment actions Permalink