cancel
Showing results for 
Search instead for 
Did you mean: 

How to UPSERT PICKLIST Values using ODATA API call using SAP CPI

1,873

Hello Team,

Request you to kindly help in sample UPSERT of picklist values for jobpplication entity in Succesfactors using SAP CPI Successfactors Adapter ODATA protocol.

Also, Please assist on the solution if any other way it can be acheived.

Here is the below mechanism, I have tried and ended with the error in the log as such the Iflow is completed but the status from SF is 400.

Request sent to SF :

<JobApplication>

<JobApplication>

<applicationId>227179</applicationId>

<medicalcheckBloodgrp>

<PicklistOption>

<picklistLabels>

<PicklistLabel>

<optionId>33270</optionId>

<id>66699</id>

<label>AB-</label>

<locale>en_US</locale>

</PicklistLabel>

</picklistLabels>

</PicklistOption>

</medicalcheckBloodgrp>

</JobApplication>

</JobApplication>

Response received from SF :


Kindly help on the above or do this needs to be checked from SF side?

Thanks in advance!!

Regards,

Prashanth

Accepted Solutions (1)

Accepted Solutions (1)

nshivaprasad5334
Participant
0 Kudos

Hi Prashanth,

I have dealt with a very similar situation very recently.

In this case, rather than upserting the picklist try upserting only picklist field with Option ID it should do the Job.

In JobApplication entity, pass the option ID to field corresponding to the medicalcheckBloodgrp picklist.

For example: For employee Status picklist, emplStatus field is there. So, in place of upserting emplStatusNav entity, we should just pass Option ID to emplStatus field only.

Hope it helps!

Thanks and Regards

Shivaprasad Narahari

0 Kudos

Hello ShivaPrasad,

Thank you so much for the reply. It worked. Here is the below.

Thanks in advance!!

Regards,

Prashanth

ankitkumarpatel
Explorer
0 Kudos
Hi Shiva, by passing defaultValue localLabel will work in this case? Just curious to see the solution

Answers (2)

Answers (2)

daviddasilva
Active Contributor
0 Kudos

Hi,

The error code seems to suggest that you need to upload the field Index with a value that is not equal to 0. Have you referred to the SuccessFactors API Reference Guide:https://help.sap.com/doc/74597e67f54d4f448252bad4c2b601c9/2111/en-US/SF_HCM_OData_API_REF_en.pdf

Kind regards,

David

0 Kudos

Hello Shivaprasad,

Thank you so much for the reply. Request you to kindly provide example on the same as such I tried the same. unfortunately, same issue.

Regards,

Prashanth