SAP Knowledge Base Article - Public

2822255 - Error "Property manager is a navigation property, the given value should be an object" - OData API Upsert call

Symptom

Error "Property manager is a navigation property, the given value should be an object" occurred when update User entity's property "Manager" with OData API Upsert Call.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP SuccessFactors HXM Suite
    • OData API

Reproducing the Issue

1. Process OData API Upsert call like below for example:

“{
"__metadata" : {
"uri": "User('123')"
},
"userId": "123",
"businessPhone": "1234566",
"empId": "123",
"timeZone":"Asia\/Shanghai"… …
"hireDate": "/Date(694224000000)/",
"manager": "223"
}”

2. Below error occurred:

{ "d": [ { "key": null, "status": "ERROR", ..."message": "Property manager is a navigation property, the given value should be an object", "index": 0, "httpCode": 400, "inlineResults": null } ] }

Cause

Property manager has type: User, it is an object rather than a string. This can be checked from OData API Data Dictionary.
2019-08-01_KBA01.png

Resolution

Please refer to SAP SuccessFactors HXM Suite OData API: Developer Guide.

Chapter: Upsert Operation
In which has an example request to update manager property as below:

"manager": {
"__metadata": {
"uri": "User('OldManager')"
}
}

Please refer to this example and re-configure the OData API Upsert call accordingly.

Keywords

success factors; successfactors; sf; OData API; User; Manager; navigation property; object, upsert, insert, update, change, , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Suite all versions