Symptom
Client submitted an odata api request using Job Requisition Entities but received an Error that says "[COE0019]while trying to invoke the method com.successfactors.rcm.api.bean.OperatorRoleEnum.getId() of a null object loaded from local variable 'role' with the index 0"
Environment
SuccessFactors Recruiting Management (RCM)
Reproducing the Issue
1. Open Postman or any 3rd party REST Application
2. Create a request using job requisition ODATA API entity
3. Received the error
Cause
The error is telling us that an operator role being called by the request is not defined correctly in the XML.
Resolution
To fix this issue and to avoid getting the error, please review the xml code and check each operator type field and verify if they defined correctly.
Example:
<field-definition id="originator" type="operator" required="true" custom="false">
<field-label><![CDATA[Creator of the job req ("O" role)]]></field-label>
<field-description><![CDATA[Creator of the job req ("O" role)]]></field-description>
</field-definition>
**** If you check the above xml code it shows that the field type operator uses originator as the field id, this is a misconfiguration, the correct field id should be originatorName ****
The correct xml code for the above example is
<field-definition id="originatorName" type="operator" required="true" custom="false">
<field-label><![CDATA[Creator of the job req ("O" role)]]></field-label>
<field-description><![CDATA[Creator of the job req ("O" role)]]></field-description>
</field-definition>
See Also
Keywords
Odata API error COE0019 , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem