We have two values in a Picklist that has the same label.
In this example, one is active and the other one is inactive:
On our request payload, I have upserted 666835 (active) and response payload showed that it was upserted.
However, when I checked in UI, the inactive one was upserted and not the active one per the request payload.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
- SAP SuccessFactors HXM Suite
- OData API
Reproducing the Issue
- Upsert the active value in picklist
- Check response payload > Status: OK & Upserted
- Checked in UI, the inactive one (that has the same label with active value picklist) was upserted
For picklist properties, the API will handle by option id or external code, however the internal SF importing logic will handle such imports by the picklist label. So when an API upsert occurs, the internal SF importing logic will convert the option id value received in the API into its label and then import it into the database. As there are duplicate labels present, it may pick an option id which is not the same as the original sent value.
In our example, the import logic derived the option id of the picklist value that is OBSOLETED, causing the issue.
Change the values of the picklist labels, making every label unique.
2773713 - Post Migration Odata API Picklist MDF and Legacy Behavior with OptionId and MDF ExternalCode
2409842 - Error "is an invalid picklist value in import file or database for" When Importing File With Cascading Picklist Values
Picklist, Upsert, Multiple, Label, Integration Center, IC, insert, change, update, API, OData, import, engine, logic, EC, SF, successfactors, unique, same, equal, , KBA , LOD-SF-INT , Integrations , LOD-SF-INT-ODATA , OData API Framework , Problem