on ‎2020 Apr 22 9:26 AM
Hi All,
Getting error while trying to insert the data into successfactor EC in a field(type: picklist fields) from SAP CPI. When I am trying with the External code value of the Picklist then I am getting error like below:
Error: "The given value null for option HR is not valid for picklist field customString2 is invalid"
Then when I was trying with Picklist Option Id then it was working fine.
So my question is whether this is the successfactor standard behaviour that it will not accept the external code value. Only work with the Option id?
OR is there any alternative solution is there to accept the external code?
Regards,
Souvik
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Souvik,
Irrespective of Legacy or MDF picklist you should be using OptionID for upserting data into SFSF.
To answer the original question you have asked whenever you query the data from SuccessFactors you will get ExternalCodes not OptionIDs.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Souvik,
Its standard behavior of SuccessFactors API.For all the data you want to upsert it SFSF involving PIcklist you should use OptionID.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sriprasadshivaramabhat,
Thanks for the quick response.
I got to know from the SFSF team that there are two type of picklist 1. Legacy 2. MDF. So for both the case, we will be using same option Id or there is different approach for two different picklist?
Below details I found from SAP help: https://help.sap.com/viewer/28bc3c8e3f214ab487ec51b1b8709adc/1911/en-US/081b0fd5ba814458887c933355f9...
Which key property do I use: optionId or externalCode?
Since the two types of picklist entities (PicklistOption, PickListValueV2) use different fields as their key properties, when you query or edit an OData entity that contains a picklist field, bear in mind that query and edit behaviors follow the OData standard. That is, always use the key property to identify a unique record. For legacy picklist fields, use the PicklistOption property id to uniquely identify a record during query or edit operations. For MDF picklist fields, use the PickListValueV2 property externalCode to uniquely identify a record in query or edit operations.
Regards,
Souvik
| User | Count |
|---|---|
| 7 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.