SAP Knowledge Base Article - Public

2469351 - Odata API upsert calls fails with Error:unknown property [PROPERT NAME] for [ENTITY NAME]

Symptom

  • Odata API fails with the below error messages when trying to upsert values for the entites (User, PerPerson, EmpJob , etc) even though the request contains mandatory fields.

Error:unknown property [PROPERT NAME]  for [ENTITY NAME]

Example:

API1.PNG

  • When the property is removed from API request body, below error occurs:

 Error:  [PROPERT NAME]  is a required field and cannot be blank"

Example:

 API2.PNG

Environment

Successfactors

Reproducing the Issue

  • Run the below API request from SOAP UI and you will see the error as shown in the screenshot above:

{"__metadata": {
 "uri": "EmpJob" },
 "jobCode":"300",
 "userId":"45623391",
 "startDate":"/Date(1388534400000)/",
 "eventReason":"1",
 "employeeClass" : "33552",
 " division" : "200",
" location" : "650",
 "company":"250",
 "company":"250",
"jobTitle": "Tech Lead",
"payGrade" :"100",
 "managerId":"100200" } }
 }

 

Cause

  • When we check the field in Odata API data dictionary, the fields are present(refer screenshot below)

API3.PNG

  • The reason why they are still erroring out is because of the whitespace we can see before these field names.

API4.PNG

Resolution

  1. Remove the whitespaces and then trigger the request which will be like below:

{"__metadata": {
 "uri": "EmpJob" },
 "jobCode":"300",
 "userId":"45623391",
 "startDate":"/Date(1388534400000)/",
 "eventReason":"1",
 "employeeClass" : "33552",
 "division" : "200",
 "location" : "650",
 "company":"250",
 "company":"250",
"jobTitle": "Tech Lead",
"payGrade" :"100",
 "managerId":"100200" } }
 }

     2. The error would now be gone.

Keywords

  • Error:unknown property [PROPERT NAME]  for [ENTITY NAME]
  •  Error:  [PROPERT NAME]  is a required field and cannot be blank"
, KBA , LOD-SF-INT-API , API & Adhoc API Framework , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Suite all versions