Symptom
You get the following error message, when you try to filter your OData API query using picklist (e.g. picklist ID): "Failed to retrieve result with given criteria":
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 Recruiting Management
Reproducing the Issue
Query an entity using OData API and use a custom picklist field in order to filter the results, e.g.:
https://apisalesdemo4.successfactors.com/odata/v2/JobApplication?$format=json&$filter=assessmentStatus/id eq '381'&$expand=assessmentStatus |
Cause
The custom picklist field has to be a reportable field in order to use it as a filter in the OData API call.
Resolution
The field definition ID has to be added to reportable custom fields. The ID can be found either in the oData API Dictionary, e.g.:
or in the relevant XML template, e.g.:
<field-definition id="assessmentStatus" type="picklist" required="false" custom="true" public="false" readOnly="false" anonymize="false" forward-intact="true"> |
If you are a Partner go to Provisioning > Configure Reportable Custom fields and add the field definition to reportable custom fields, e.g.:
If you are a customer, please contact your Implementation Partner or SAP Product Support in order to make the field reportable.
More information on reportable custom fields can be found in the following Knowledge Base Article: 2081508
Keywords
Failed to retrieve result with given criteria. RCM, Picklist, Odata, filter , KBA , LOD-SF-RCM-API , Webservices & APIs , LOD-SF-INT-API , API & Adhoc API Framework , Problem