cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Getting error while trying to insert the data into successfactor EC in a field from SAP CPI

SinhaSouvik
Active Participant
0 Likes
3,053

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

Accepted Solutions (1)

Accepted Solutions (1)

SinhaSouvik
Active Participant
0 Likes

Hi Sri,

I found one SAP Note 2773713 - Post Migration Odata API Picklist MDF and Legacy Behavior with OptionId and MDF ExternalCode.

Here you can find that depending on the EC configuration sometimes it accept Option Id and some times External Code.

Regards,

Souvik

Answers (2)

Answers (2)

Sriprasadsbhat
Active Contributor
0 Likes

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

SinhaSouvik
Active Participant
0 Likes

Thanks Sri.

Sriprasadsbhat
Active Contributor
0 Likes

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

SinhaSouvik
Active Participant
0 Likes

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