Symptom
Compound Employee API call fails with following error which can be seen in its response:
<node_name>job_information</node_name>
<field_name>custom_string2</field_name>
<xpath>//sfobject[1]/person/employment_information[1]/job_information[1]</xpath>
<code>COMPOUND_EMPLOYEE/PICKLIST_INVALID</code>
<severity>WARNING</severity>
<message_text>Field "custom_string2" can't be returned: Please make sure that the external code for picklist "empJobTest" with option ID "667569" is valid. If this is a migrated picklist, please maintain missing non-unique external codes for this picklist.</message_text>
In this example above, "empJobTest" is the picklist name and the picklist value with option ID "667569" is the one failing.
Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Environment
- SAP SuccessFactors HXM Suite
- Compound Employee API
Cause
Currently there are four possible causes to this error:
- There is no "Non-unique External Code" value maintained in Picklist Center if this is a migrated picklist
- There is no "external_code" value maintained in the picklist configuration if this is a non-migrated picklist
- At some moment in the past the picklist Option ID was different than the one that it is configured at the moment
- The employee affected has an invalid/corrupted picklist value saved
Resolution
For cause 1:
- Go to Picklist Center
- Open the picklist and the picklist value that is failing
- Set a value under "Non-unique External Code" field and save
For cause 2:
- Go to Admin Tools > Picklist Management > Picklists
- Select "Export all picklists" > Click on Submit > Download and open the CSV file
- Search for the picklist option ID suggested in the error
- Maintain an "external_code" value for all the Option ID present for the corresponding picklist ID
- Save changes to the picklist file
- Select "Import Picklist" and import the csv file.
For cause 3:
When you set a picklist value to an employee record it will save a snapshot of this employee record in the database that Compound Employee fetches data. This means that at the time that the employee record was saved, the picklist option ID was different then it is right now. As Compound Employee is still trying to fetch data with the option ID from the past due to this snapshot that is saved in database, it won't find the picklist data because the picklist has a different option ID now.
In order to solve this, you can do a dummy change in the employee profile portlet that has data for that picklist - this will make the most recent option ID of the picklist be saved in the database, solving the issue in Compound Employee API.
For cause 4:
If you go to the employee's profile, check the history of the specific session (Job Info, Personal Info, etc) you'll notice that when you are just displaying the data the picklist field seems to be working as expected, however as soon as you click in edit, the same field will appear as empty, this means that the value that once was stored in that field has changed (either external code, or option ID) and hence the field lost its reference to the picklist in the database.
To fix this issue there are two possible approaches:
- If this is just for a few records you may manualy update the field which will be faster then exporting and formating a CSV file to import;
- If you need to fix several employees and effective dated records, then the best option is to perform a full purge import for the affected employees and entities;
Keywords
externalcode, picklist, option ID, Boomi, SAP PI, Compound Employee, ce, Please make sure that the external code for picklist, with option ID, is valid, COMPOUND_EMPLOYEE/PICKLIST_INVALID, option id, Non-unique External Code, picklist center, migrated, mdf, non-migrated, , KBA , LOD-SF-INT-CE , Compound Employee API , LOD-SF-INT , Integrations , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , LOD-SF-INT-BOM , Standard SF to 3rd Party Boomi Content , Problem