2372331 - Error: "Failed to retrieve result with given criteria." occurs when trying to filter on a picklist field using oData API - Recruiting Management

SAP Knowledge Base Article - Public

2372331 - Error: "Failed to retrieve result with given criteria." occurs when trying to filter on a picklist field using oData API - Recruiting Management

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":

28-09-2016 13-57-15.png

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

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.:

28-09-2016 14-17-30.png

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">
<field-label mime-type="text-plain"><![CDATA[Assessment Passed: ]]></field-label>
<field-description><![CDATA[Assessment Status]]></field-description>
<picklist-id>yesNo</picklist-id>
</field-definition>

 

If you are a Partner go to Provisioning > Configure Reportable Custom fields and add the field definition to reportable custom fields, e.g.:

28-09-2016 13-58-33.png

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

KBA , LOD-SF-RCM-API , Webservices & APIs , LOD-SF-INT-API , SF API & Adhoc API Framework , Problem

Product

SAP SuccessFactors HCM Core all versions