SAP Knowledge Base Article - Public

2237684 - SFAPI entity JobApplication fails with the error: Query failure! Error: Failed to query

Symptom

This KBA explains the root cause and the solution for the error which occurs while querying JobApplication SFAPI entity.

Environment

Bizx, RCM module, SFAPI entity

Reproducing the Issue

1.Configure the fields in the JobApplication template in the backend, the SFAPI entity is available in the instance for querying.
2.Query the Successfactors instance using the Jobapplication entity.
3.Query response received contains the error mentioned in the Title

For Example:
Request: 

<?xml version="1.0" encoding="UTF-8"?>
  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header />
      <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <query xmlns="urn:sfobject.sfapi.successfactors.com">
             <queryString>SELECT id,jobReqId,title,firstName,middleName,lastName,contactEmail,cellPhone,address,address2,city,state,otherState,zip,dateOfBirth,empNo,EmpNo2,visaRequired,attType,empType,classification,salaryCLC,hoursMin,contractEnd,commenceDate FROM jobApplication$2 where statusItem = 'Export to MyHR' and exportedOn IS null</queryString>
               <param>
                  <name>maxRows</name>
                  <value>200</value>
              </param>
         </query>
      </s:Body>
  </s:Envelope>

 
Response: 

<?xml version="1.0" encoding="UTF-8"?>
  <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
        <ns2:Fault xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
           <faultcode>ns2:Server</faultcode>
              <faultstring>SFAPI Domain Error!</faultstring>
                 <detail>
                   <ns2:SFWebServiceFault xmlns:ns2="urn:fault.sfapi.successfactors.com" xmlns="urn:sfobject.sfapi.successfactors.com">
                   <ns2:errorCode>QUERY_FAILURE</ns2:errorCode>
                   <ns2:errorMessage>Query failure! Error: Failed to query</ns2:errorMessage>
                   </ns2:SFWebServiceFault>
                 </detail>
        </ns2:Fault>
    </S:Body>
  </S:Envelope>

 
 

Cause


After comparing the requistion and the application templates the root cause was found as configuration issue of Job Application template.

In application template the field 'title' is configured as custom field.

<field-definition id="title" type="picklist" required="true" custom="true" public="true" readOnly="false" anonymize="false" forward-intact="true">
<field-label mime-type="text-plain"><![CDATA[Title]]></field-label>
<field-description><![CDATA[]]></field-description>
<picklist-id>salutation</picklist-id>
</field-definition>

But the field 'title' is used as standard field for job requisition.

<field-definition id="title" type="text" required="true" custom="false">
<field-label><![CDATA[Position Title]]></field-label>
<field-description><![CDATA[]]></field-description>
</field-definition>

Hence the error.

Resolution

  • It is always recommended by successfactors to append “cust_” for custom fields, this will avoid configuration errors and also will result in non-repetitive names for fields.
  • For example instead of “title” the field can be named as “cust_title”.
  • Standard fields cannot be used as a custom field.

Keywords

Interface Error - SFAPI domain error , KBA , query failure! error: failed to query , interface error - sfapi domain error , LOD-SF-INT-RCM , RCM-Any Integration , LOD-SF-INT , Integrations , LOD-SF-INT-BOM , Standard SF to 3rd Party Boomi Content , Problem

Product

SAP SuccessFactors HCM Core all versions