Symptom
When using API to update the candidate agreeToPrivacyStatement the API call provides the following error:
Candidate upsert failed: while trying to invoke the method com.successfactors.dpcs.bean.DpcsVersion.getDpcs() of a null object loaded from local variable 'currentDpcs' with the index 0
Environment
SAP SuccessFactors Recruiting Management.
Cause
Candidate didnt have the country field defined in the Candidate profile. As the country field was blank the system was not able to provide a DPCS statement to change the agreeToPrivacyStatement.
Resolution
Update the country field of the candidate profile. Once the Country field has been updated with a correct value rerun the API call to set the agreeToPrivacyStatement.
Keywords
DPSC, agreeToPrivacyStatement, , KBA , LOD-SF-RCM-API , Webservices & APIs , Problem