SAP Knowledge Base Article - Public

2832450 - UPSERT null value on date-type field returns error - SuccessFactors API

Symptom

You perform an UPSERT call providing a null value to a date-type field and the errors below are received in return:

Error: Invalid value for field '<date-type_field>' - FAILED_PARSE_DATE_STRING: The date string is null or empty.:

or

The given value null for property startDate is invalid. Valid values are:[]. Please check the property in Admin Center &gt; OData API Data Dictionary. with the index 0

Environment

  • SAP SuccessFactors HCM Suite
    • SFAPI
    • OData

Resolution

Don't mention the date-type field that you want to have the null value in the payload of your API call. This will make the API upsert the field with a null value.

If you are providing the field in the call like this:

<sfobject>
   <id>BKG-72483</id>
   <type>Background_Awards</type>
   <issueDate></issueDate> //date-type field
   
<name>blabla</name>
</sfobject>

Remove it from the payload, which will make it look like this:

<sfobject>
   <id>BKG-72483</id>
   <type>Background_Awards</type>
   <name>blabla</name>
</sfobject>

Keywords

background, date, successfactors, success, factors, null, empty, blank, sfapi, compound employee, ce, odata, upsert, , KBA , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-API , API & Adhoc API Framework , How To

Product

SAP SuccessFactors HCM Suite all versions