SAP Knowledge Base Article - Public

2808842 - Invalid error when trying to insert picklist values using SFAPI

Symptom

When doing an Insert call containing picklist values using SFAPI, the following error is received as response:

<result>
<jobStatus>ERROR</jobStatus>
<message></message>
<objectEditResult>
<errorStatus>ERROR</errorStatus>
<editStatus>NOEDIT</editStatus>
<index>0</index>
<message>Exception occured on <entity> with the guid : XXXXX. Root cause: Value XXXXX of field XXXXX is invalid for picklist XXXXX.</message>
</objectEditResult>
</result>

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

Environment

SuccessFactors Recruiting Management (RCM)

Reproducing the Issue

Run an insert call containing picklist values with SFAPI and receive the above error message as response. The picklist value you are inserting is present in the picklist and is ACTIVE.

Cause

This occurs when:

  • there is another entry for the same picklist value with OBSOLETED status
  • the OBSOLETED entry has a picklist ID smaller than the ACTIVE entry

In this scenario, SFAPI will select based on the label only and therefore pick the entry with the smaller picklist ID. As it is OBSOLETED, the insert will fail and this error message is received as response.

Example: You insert the picklist entry with label 'Test' in your SFAPI call. Your picklist has an OBSOLETED value of 'Test' with ID 100, and an ACTIVE value of 'Test' with ID 200. You will receive the error.

Resolution

This is expected behaviour. To solve the error, you need to change the status of the OBSOLETED picklist entry to DELETED, and the call will resolve without further issue.

Note that while this is expected, there is a prevention item with Engineering to change this behaviour in a future release. If you are interested, you can ask your CSM to track the progress using the reference RCM-65952.

Keywords

SFAPI, picklist, invalid, active, obsoleted , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem

Product

SAP SuccessFactors Recruiting all versions