SAP Knowledge Base Article - Public

2273484 - SFAPI upsert/update for JobRequisition$XXX fails ; Root cause: "Fieldname" is invalid for picklist

Symptom

You are trying to upsert/update a picklist field using the SFAPI JobRequisition$XXX entity.

Below error is thrown:

Exception occured on jobRequisition with the guid :"XXXX" . Root cause: "fieldname" is invalid for picklist "picklist-id"

 

Environment

Successfactors System

Reproducing the Issue

The below sample explains how the error can be re-produced.

SOAP Request

<soapenv:Header />
  <soapenv:Body>
    <urn:update>
      <urn:type>jobrequisition$772</urn:type>
      <urn:sfobject>
        <urn:type>jobrequisition$772</urn:type>
        <urn:id>581</urn:id>
        <urn:status>389</urn:status>
      </urn:sfobject>
    </urn:update>
  </soapenv:Body>
</soapenv:Envelope>

In the above Soap request, OptionId for the field "status" is being entered. The Soap response with error for the same is shown below.

SOAP Response
<result>
        <jobStatus>ERROR</jobStatus>
        <message />
        <objectEditResult>
          <id>581</id>
          <errorStatus>ERROR</errorStatus>
          <editStatus>NOEDIT</editStatus>
          <index>0</index>
          <message>Exception occured on jobRequisition with the guid : null. Root cause: status is invalid for picklist jobReqStatus</message>
        </objectEditResult>
      </result>


Cause

You have used the OptionId/external_code for the picklist field in the update/upsert soap request.

Resolution

Please use en_US values in the soap request to perform an update/upsert to the picklist fields in JobRequisition$XXX entity.

An example is shown below.

  SOAP Request

<soapenv:Header />
  <soapenv:Body>
    <urn:update>
      <urn:type>jobrequisition$772</urn:type>
      <urn:sfobject>
        <urn:type>jobrequisition$772</urn:type>
        <urn:id>581</urn:id>
        <urn:status>Interviewing</urn:status>
      </urn:sfobject>
    </urn:update>
  </soapenv:Body>
</soapenv:Envelope>

SOAP Response
<result>
        <jobStatus>OK</jobStatus>
        <message />
        <objectEditResult>
          <id>581</id>
          <errorStatus>OK</errorStatus>
          <editStatus>UPDATED</editStatus>
          <index>0</index>
          <message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
        </objectEditResult>
      </result>

See Also

How to check the values available in en_US ?

Navigate to Admin Centre -> Picklists Management -> Export picklist and check the values (screenshot of the same below)

en_us.jpg

Keywords

Update fails on JobRequisition$XXX entity Root cause: "Fieldname" is invalid for picklist. , KBA , LOD-SF-INT-RCM , RCM-Any Integration , LOD-SF-INT , Integrations , Problem

Product

SAP SuccessFactors HCM Suite 1511