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:
- When the property is removed from API request body, below error occurs:
Error: [PROPERT NAME] is a required field and cannot be blank"
Example:
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)
- The reason why they are still erroring out is because of the whitespace we can see before these field names.
Resolution
- 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"